Re: [PHP] fopen() for http:// sometimes working, sometimes not
On Dec 27, 2007 11:31 AM, Albert Wiersch [EMAIL PROTECTED] wrote: I noticed my script at http://onlinewebcheck.com was sometimes (fairly often) failing to open some URLs that users have entered. fopen() returns false very quickly, but when tried again with the same URL, sometimes it works. What would cause this behavior? Why does fopen() occasionally fail to open valid http addresses but works at other times? Are the URLs being passed to fopen() properly escaped? Are they valid, complete with http:// placed before the domain? Try keeping a log of all URLs entered for a bit, and see which ones fail. -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fopen() for http:// sometimes working, sometimes not
I noticed my script at http://onlinewebcheck.com was sometimes (fairly often) failing to open some URLs that users have entered. fopen() returns false very quickly, but when tried again with the same URL, sometimes it works. What would cause this behavior? Why does fopen() occasionally fail to open valid http addresses but works at other times? -- Albert Wiersch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fopen() for http:// sometimes working, sometimes not
Daniel Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Dec 27, 2007 11:31 AM, Albert Wiersch [EMAIL PROTECTED] wrote: Are the URLs being passed to fopen() properly escaped? Are they valid, complete with http:// placed before the domain? Try keeping a log of all URLs entered for a bit, and see which ones fail. It's not the URL because the same URL will not work one time but will work another time. What needs to be escaped for a URL anyway? I am just changing spaces to '%20' now. I will try upgrading to 5.2.5. I'm using 5.2.3 now. Thanks, Albert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fopen() for http:// sometimes working, sometimes not
On Dec 27, 2007 12:57 PM, Albert Wiersch [EMAIL PROTECTED] wrote: What needs to be escaped for a URL anyway? I am just changing spaces to '%20' now. Arbitrary code can still be injected unless it's properly sanitized, but that's beyond the scope here. Mainly, make sure quotes (single and double) are being converted. -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php