note 19238 added to function.fsockopen
| From: | nobs at tigress dot com | Date: | Wed, 20 Feb 2002 15:36:25 +0000 |
| Subject: | note 19238 added to function.fsockopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26849@lists.php.net to get a copy of this message | ||
I am trying to get a file through tftp but I don't get the response from the server:
<?php
$fp = fsockopen ("udp://host", 69, $errno, $errstr, 5);
if (!$fp) {
print ("$errstr ($errno)");
}
else {
fputs ($fp, chr(0) . chr (1) . "testing" . chr (0) . "netascii" . chr (0));
socket_set_blocking ($fp, FALSE);
while (!feof ($fp)) {
$result = fread ($fp, 65536);
print ($result);
flush ();
}
fclose ($fp);
}
?>
With a sniffer I can see the server sending the response, but not from the tftp-port. I am running
this under Solaris 8. Any hints?
--
http://www.php.net/manual/en/function.fsockopen.php
http://master.php.net/manage/user-notes.php?action=edit+19238
http://master.php.net/manage/user-notes.php?action=delete+19238
http://master.php.net/manage/user-notes.php?action=reject+19238