I E's, I use this line of code for test the connection of a website:
<? $url_actual = "
www.example.com";
$fp = fsockopen("$url_actual", 80, $errno, $errstr, 1); ?>
fsockopen returns if have connection or not.
Perhaps, if I use a address like
www.example.com/index/site.php, the system return a error:
"
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/tags/public_html/tes
te2.php on line 3
Warning: fsockopen() [function.fsockopen]: unable to connect to
www.example.com/index/site.php:80 (php_network_getaddresses:
getaddrinfo failed: Name or service not known) in /home/tags/public_html/tes
te2.php on line 3"
//LINE3: $fp = fsockopen("$url_actual", 80, $errno, $errstr, 1);
fsockopen just read a pure domains or subdomains, they don't check url with domains+folder+file?
If fsockopen don“t work for check url's, what is the alternative for check if the url exists and have connection?
Regards, JC
http://php.net/manual/en/function.fsockopen.php#75388