I have a function that I use to test is the URL is valid before I store it in my db.
function url_exists($url)
{
ini_set("default_socket_timeout","5");
set_time_limit(5);
$f = fopen($url, "r");
$r = fread($f, 1000);
fclose($f);
return strlen($r) > 1;
}
if( !url_exists($test['urlRedirect']) ) { ... }
It works great, however one of my users reported an issue today and when I tested, indeed the following URL was flagged as invalid:
http://www.artleaguehouston.org/charge-grant-survey
So I tried to remove the page name and use only the domain and still got the error. What is it about this domain that my script chokes on?