...

View Full Version : daed or alive link



zodehala
02-15-2008, 07:25 PM
how can i know a link dead or alive ? ( which function do i have to use ?)

angst
02-15-2008, 08:00 PM
could do it like this:



if(@fopen("SomeDomain.com", "r")){
// active link
} else {
// dead link
}


thats one way of doing it.

zodehala
02-16-2008, 09:11 AM
thanks

we can do like this too


$url = "www.codingforums.com";
$fp = @fsockopen($url,80,$errno, $errstr, 30);
if (!$fp) {
echo "Error No: $errno <br/> Error : $errstr";
} else {
echo $url ." link is ok";
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum