Jump to content

Recommended Posts

Hey!

I got this script called "rapidshare link checker v2 php by Bigfish"

At the moment the script checks the links inside $links =  " ". I would like it to check all the megaupload links on the page.

If that doesnt work it would be ok if you guys help me make some changes so the script ignores all code except megaupload links.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bigfish58's Rapidshare Link Checker</title>
<style type="text/css">
<!--
.style1 {
color: #000000;
font-weight: bold;
font-size: 18px;
font-family: Verdana;
}
-->
</style>
</head>

<body>
Bigfish58's Rapidshare.com Link Checker<br>
Now supports megaupload, megashares, sendspace, medaifire, rapidshare.com, 

rapidshare.de 
      <span class="style1">Results:</span><br />
      <?
$time = microtime();

$time = explode(" ", $time);

$time = $time[1] + $time[0];

$start = $time;



$links =  "http://www.megaupload.com/?d=RATKA0H9";

$link = explode("\n",$links);

foreach($link as $url){


$url = preg_replace('/\s+/', '', $url);
        if(!empty($url)){
        if(strstr($url,"rapidshare.com")){
        $var = file_get_contents($url);
        $checked = $checked + 1;
        if(strpos($var,"You want to download the file ")){
        echo "<font color=\"green\">". $url . " was found!<br></font>";
        $working = $working + 1;
        }
        if(strpos($var,"File not found.")){
        echo "<font color=\"red\">". $url . " was not found!<br></font>";  
        }      
        if(strpos($var," deleted.")){
        echo "<font color=\"red\">". $url . " has been deleted!<br></font>";
        }


} elseif (strstr($url,"megaupload.com")){
	$var1 = file_get_contents($url);
	$checked = $checked +1;
	if(strpos($var1,"Please enter")){
		echo "<font color =\"green\">" . $url . " was 

found!<br></font>";
		$working = $working + 1;
	}
	if(strpos($var1,"Unfortunately, the link you have clicked is 

not available.")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	
	}

} elseif (strstr($url,"megashares.com")){
	$var2 = file_get_contents($url);
	$checked = $checked +1;
	if(strpos($var2,"Filename:")){
		echo "<font color =\"green\">" . $url . " was 

found!<br></font>";
		$working = $working + 1;
	}
	if(strpos($var2,"Welcome to Megashares")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	
	}
	if(strpos($var2,"have the correct URL")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	
	}

} elseif (strstr($url,"sendspace.com")){
	$var3 = file_get_contents($url);
	$checked = $checked +1;
	if(strpos($var3,"404 Page Not Found")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	

	} elseif(strpos($var3,"Sorry, the file you requested is not 

available.")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	
	} else {
		echo "<font color =\"green\">" . $url . " was 

found!<br></font>";
		$working = $working + 1;
		}
	} elseif(strstr($url,"rapidshare.de")){
	$var5 = file_get_contents($url);
        $checked = $checked + 1;
        if(strpos($var,"You want to download the file ")){
        echo "<font color=\"green\">". $url . " was found!<br></font>";
        $working = $working + 1;
        }
        if(strpos($var,"File not found.")){
        echo "<font color=\"red\">". $url . " was not found!<br></font>";  
        }      
        if(strpos($var," deleted.")){
        echo "<font color=\"red\">". $url . " has been deleted!<br></font>";
        }

} elseif (strstr($url,"mediafire.com")){
	$var4 = file_get_contents($url);
	$checked = $checked +1;
	if(strpos($var4,"Sharing")){
		echo "<font color =\"green\">" . $url . " was 

found!<br></font>";	
		$working = $working + 1;
	}
	if(strpos($var4,"Invalid Quickkey.")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	
        }
	if(strpos($var4,"I want to upload")){
		echo "<font color =\"red\">" . $url . " was not 

found!<br></font>";	
        }
} else {
		echo "<font color =\"red\">" . $url . " is either in 

the wrong format or ir is uknown to the script!<br></font>";	
}

}

}
        echo "Successfully checked " .$checked. " links.";
$time = microtime();

$time = explode(" ", $time);

$time = $time[1] + $time[0];

$finish = $time;

$totaltime = ($finish - $start);

printf ("The script took a toal of %f seconds to check all the links. ", 

$totaltime);

echo round($working / $checked  * 100) . "% of the links are working.";	

?>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/164711-link-checker-need-some-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.