|
Posted by artemio on 09/15/06 16:25
Hello all!
I need some help with sockets. I have this code:
$Connection = fsockopen( "google.com", 80, $ErrNo, $ErrStr, 30 );
if($Connection){
echo "Connection established\n";
while(!feof($Connection)){
echo fgets($Connection, 128);
}
echo "Got some data\n";
} else {
echo "Error $ErrNo: $ErrStr\n";
}
But it never gets to output anything, it only prints "Connection
established" and then the script simply gets stuck, it never gets to
say "Got some data"...
Any help will be very appreciated.
Thanks,
Artemiy.
Navigation:
[Reply to this message]
|