Skip to content
WJunction - Webmaster Forum

Rapidshare link check

Status
Not open for further replies.
Hiya mates,

i have new project website and i need some snippets
http://rapidlinks.ru /link/?lnk=146446like in example checking rapidshare links showing status (dead or alive) and their size, if dead delete from database
how can i do this with curl or rapidshare api?
Any idea?

PHP:
<!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">
 
<body>
<center>
<form method="post" action="">
Rapidshare Links:<br />
<textarea name="url" rows="10" cols="50"></textarea><br /><br /><input type="submit" name="submit" value="Check Links"> | <input type="reset" value="Clear">
</form>
 
<?php
if(isset($_REQUEST['submit'])){
echo "<br />-------------------------------------------------<br />";
$url = @$_POST['url'];
if ($url == ""){
echo "Invalid URL(s)";
} else {
$url = explode(" ", $url);
$url = implode("\n", $url);
$url = explode("\n", $url);
$url = array_unique($url);
 
foreach ($url as $urls){
$rsurls = @file_get_contents($urls);
if (preg_match("/FILE DOWNLOAD/", $rsurls)){
$url = trim($url); #before $url = explode(" ", $url);
#then i add option to view the size of the files :
$pos1 = strpos($rsurls,">| ");
$pos2 = strpos($rsurls," KB");
echo substr($rsurls, $pos1+3, $pos2-$pos1)." ";
# all lines right after if (preg_match("/FILE DOWNLOAD/", $rsurls)){
echo '<a href="'.$urls.'"><font color="green">'.$urls.'</font></a> - Valid<br />';
} else {
echo '<a href="'.$urls.'"><font color="red">'.$urls.'</font></a> - Dead<br />';
}
}
echo "<br /><font size=\"2\">".sizeof($url)." Links Checked</font>";
}
}
?>
<br /><br />
</center>
</body>
</html>
 

16 comments

Hmm dump that script as it's using file_get_contents.

If your after ''some snippets'' then just search for Dman's link checker's, Cyberj did a basic one recently and Navzi/Nadi/N**** had a few IPB ones too. You can also look at the Link Hound and Link Detective (both old and not that stable) for PHPBB if your looking for ideas or see how they work. Their's also a few for vBulletin.

Study the above to see how they work and get some ideas. You didn't mention what forum this is for though.
 
i dont search addon for forums :)) i will build new site exactly like rapidlinks.ru but i need only that rapidshare api page..i couldnt write by myself. can you help me?
 
He's offering $250 in the Buy Sell area but it's not near enough for the size of the project. I had a look and their's a mountain of work and features on that site. It could end up taking months between the designing, writing and testing to reach the required level. Also found a few posts where masterofdeath has asked on other sites all with no luck.

Seriously need to reconsider the budget.
 
And RapidWizard. Its better than LinkzBot because its more integrated lol.

More integrated? You can use mine on any site and even members that have javascript disabled so don't say it's more integrated cause it's just crap.
Mine has way more features, way to many to mention. You're is just a glorified Firefox plugin.
The comment is also totally off topic and no use to the original poster.

If you wanna make a spam reply go spam in your own thread.

@ shadow.prx I'll PM you as the registering security features are pretty strong to stop people gaining access to other peoples site info.

If anyone looked at the site the link checker is only a small part of what he's requiring. It's a whole site build with member's registration, admin control panel, moderator control panel, member posting area, preview features, post moderation que, stats and rating system, search features, full seo and lots lots more. I've talked to the guy over PM's but the price is just too low for what he's looking for.
 
It is more integrated because you get instant feedback on the status of the links with no user interaction. Also, its got nothing to do with a firefox plugin. Why do you need all those other features? Most of them are pointless.
 
apologies to masterofdeath for this going off topic.

It's like one of the many firefox plugin's that checks links. It does exactly the same thing except it does it for non firefox users too.

The ability to record the links that members see which are dead is not pointless. Most members, especially guests, never report topics. This you cannot possibly deny.
The function to add extra domains was requested several times as was the one to add staff even here on posts on wjunction which you can search. People were creating multiple accounts and forgetting passwords. That's why they were added.
All features are the result of requests or problems members were having.
 
Yes, it is like the greasemonkey plugins, but the webmasters have control over it. GM is the choice of the end user, but with this, the webmaster has total control over what happens. So its hardly the same thing at all. One could argue that yours is worse than a firefox plugin.

I do admit that the statistics about dead links is a good feature, which I am currently implimenting. I am currently porting my script to python, however, so that I can run it on google app engine. Then I will add those features.
 
http://www.wjunction.com/showthread.php?t=17264 the linkbot i posted the code for uses rapidshare API checking, just take the code from there.


Hi i checked.. Good script. But how can i take filesize?

Regards

PHP:
if(eregi("rapidshare.com/files/", $link))     {rscheck($link , $x);$x++;}function rscheck($link , $x){        global $live;        global $dead;        $files_pattern= '/\/files\/([^\/]*)\//';        $filename_pattern= '/\/files\/.*\/(.*)/';        preg_match($files_pattern, $link, $matches_id);        preg_match($filename_pattern, $link, $matches_name);        $res= file_get_contents("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files={$matches_id[1]}&filenames={$matches_name[1]}");        list($fId,$fName,$fSize,$fServerId,$fStatus,$fShortHost,$fmd5) =explode(',',$res);if ($fStatus==1) {   flush();        ob_flush();echo"<span style='background-color:green;color:Black;font-size:8pt;text-align:left; margin: 1px 0px'>$x: Active:</span> <a href=\"$link\" target=\"_blank\">$link</a><br />\n";$live++;}else {   flush();        ob_flush();echo "<span style='background-color: red; color:Black;font-size:8pt;text-align:left;margin:1px 0px'>$x: Dead:</span> <a href=\"$link\" target=\"_blank\">$link</a><br />\n";$dead++;}}
 
Status
Not open for further replies.

About the author

M
Active Member · Joined
217
Messages
0
Reactions
16
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom