Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.