note 19238 rejected from function.fsockopen by zak
| From: | zak@php.net | Date: | Wed, 20 Feb 2002 17:48:15 +0000 |
| Subject: | note 19238 rejected from function.fsockopen by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-26855@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?