ID: 40197 User updated by: ddrewery at gmail dot com Reported By: ddrewery at gmail dot com -Status: Feedback +Status: Open Bug Type: HTTP related Operating System: Fedora Core 6 PHP Version: 5.2.0 Assigned To: tony2001 New Comment:
Ok, its being blocked by the firewall.. however I still confused at why. Port 80 is wide open and fsockets work fine. $location = "www.google.com"; $fp = fsockopen($location, 80, $errno, $errstr, 30); $out = "GET / HTTP/1.1\r\n"; $out .= "Host: ".$location."\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { $result .= fgets($fp, 128); } fclose($fp); print $result; That works fine $location = "http://www.google.com"; $result = file_get_contents($location); That does not work. Does file_get_contents() use anything other than port 80 for http requests?? Previous Comments: ------------------------------------------------------------------------ [2007-01-23 15:26:17] [EMAIL PROTECTED] >You could not telnet because I have it blocked on >all my servers. How did you do it? >trying to load a 6000 byte file, it hangs up at 60. .. which can hardly be PHP problem. ------------------------------------------------------------------------ [2007-01-23 15:10:17] ddrewery at gmail dot com Ok.. I double checked and I have port 80 wide open in and out on the firewall. You could not telnet because I have it blocked on all my servers. I'm watching the firewall logs now and this is what I show.. trying to load a 6000 byte file, it hangs up at 60. # Source IP Source Port Destination IP Destination Port Protocol Src Interface Dst Interface Tx Bytes Rx Bytes 1 66.210.47.156 32787 66.210.130.9 53 UDP OPT WAN 146 327 2 66.210.47.156 42404 69.20.65.142 80 TCP OPT WAN 112 60 .156 is my server, the .9 is the dns lookup, and the .142 is where the image is. ------------------------------------------------------------------------ [2007-01-23 10:29:13] [EMAIL PROTECTED] The host is behind a Sonicwall. ------------------------------------------------------------------------ [2007-01-22 21:23:31] ddrewery at gmail dot com I emailed you the root password. I also created an account called tony. ------------------------------------------------------------------------ [2007-01-22 21:02:55] [EMAIL PROTECTED] Absolutely no need for root access, just a usual unprivileged account is enough. Sure, send it to [EMAIL PROTECTED] ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40197 -- Edit this bug report at http://bugs.php.net/?id=40197&edit=1