Hey…
Am trying to implement a certain code to automatically check if the url is valid or not…
here is the script…
$downloadlink1=$_REQUEST[‘downloadlink’];
$fp=fsockopen($downloadlink1,80,$errno, $errstr, 30);
if (!$fp) {
echo " the url specified isnt correct";
}
i keep getting this error if the url starts with http… "unable to connect to http://:80 (Unable to find the socket transport “http” - did you forget to enable it when you configured PHP?) " + the script doesnt work if id like to check a file for example http://www.pctools.com/downloads/sdsetup.exe … it gives the following errors
[COLOR=DarkRed]Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\Apache Group\Apache2\htdocs\downloadsite\insertenglish.php on line 12
Warning: fsockopen() [function.fsockopen]: unable to connect to www.pctools.com/downloads/sdsetup.exe:80 (Unknown error) in C:\Apache Group\Apache2\htdocs\downloadsite\insertenglish.php on line 12[/COLOR]
how can i solve the 1st and the 2nd problem… thnx