ma xkè se dico socket nessuno mi risponde?
Codice PHP:
<?php
$ip = '207.58.142.122';
echo "Connessione in corso su $ip ... ";
$fp = fsockopen($ip, '21', $errno, $errstr, 5);
if (!$fp) die("Errore! $errstr ($errno)\n");
else {
echo "[CONNESSO]\n";
while(!feof($fp)) {
$line=@fgets($fp);
echo $line;
}
}
echo "test";
?>
esce
C:\test>php a.php
Connessione in corso su 207.58.142.122 ... [CONNESSO]
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 23:19. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
non viene test.. non esce mai dal while.. ma perchè?