I know this isn't your code but...
* Thus wrote Justin French ([EMAIL PROTECTED]):
> [...]
>
> // test the URL
> // it's important that you dont put http:// or it will not work
> // the 2nd paramater is how long to test the URL b4 timing out
> $found = fsockopen($url, 10);
$found = fsockopen($host, $port, $errno, $errstr, $timeout);
>
> // act on it
> if($found)
> {��
> ����echo "URL http://{$url} could not be found, thus is considered
> invalid";
hm... actually this is found but any way but any way since it is found
might as well check the uri..
fputs($found, "GET $uri HTTP/1.0\r\nHost: $host\r\n\r\n");
$status = fgets($found)
list(proto, $result, $result_text) = split($status);
if ($result != 200 ) {
echo "url is bad, give me a better one";
} else{
echo "thank you for for the url";
}
> }
> ?>
and of course
fclose($found); //we dont want the rest of the page.
hmm.. I think I did to much.. just that other peoples code frighten me
sometimes....
btw, the above code is copyrighted so dont use it.
cheers,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php