Jump to content

[SOLVED] url check not working


Recommended Posts

this is the code i use to check if a user entered url is valid.

 

function test_httpurl($url)
{
$resaults = (($fp = @fopen($url, 'r')) === false) ? false : @fclose($fp);
if($resaults==FALSE)
{
return $url.BADURL;
}
}

 

I use it on my personal server (it has php 5) and it works fine.

however I'm trying to use it on another server that only has php 4.xx.

 

MY problem is on the new server every thing is returned as false.

 

Does any one know why?? I'm thinking it might be either a php.ini setting or a limitation of php 4.

 

I looked up fopen() and it should work fine on php 4, so im fairly sure its a php.ini setting.

 

do u guys have any ideas?

Link to comment
https://forums.phpfreaks.com/topic/157123-solved-url-check-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.