Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: john34516 - joulukuu 26, 2007, 06:43:25 IP

Otsikko: Rapidshare Checker
Kirjoitti: john34516 - joulukuu 26, 2007, 06:43:25 IP
a mod that check if a rapidshare link is alive or dead and if the link is dead write under the link that is dead
Otsikko: Re: Rapidshare Checker
Kirjoitti: edi67 - tammikuu 10, 2008, 09:59:00 AP
I will need too this mod

somebody can understand this:

http://userscripts.org/forums/2/topics/1501

// ==UserScript==
// @name           Rapidshare Link Checker
// @namespace      http://userscripts.org/users/33515/scripts
// @description    Checks if rapidshare.com links have are invalid. If so, the links will be marked.
// @include        *
// ==/UserScript==


      var links = document.getElementsByTagName("a");
      for (var i=0; i<links.length; i++) {
        if (links.href.match(/^http:\/\/(www\.)?rapidshare\.com\/files\/\d+\/.+/gi)) {
          GM_xmlhttpRequest({
            method: "GET",
            url:    links.href,
            onload: function(e) {
              if (e.responseText.indexOf("File not found") > -1 || e.responseText.indexOf("This file has been deleted") > -1) {
                links.style.textDecoration = "line-through";
                links.title = "This link is invalid";
                //links.setAttribute("style", "text-decoration:line-through;");
                //links.setAttribute("title", "This link is invalid.");
              }
            }
          });
        }
      }
If the link is invalid, the link will look something like this:

I couldn't test it, since you didn't think so far as to post 2 links that have been deleted/are invalid, but I believe it will work.

And next time, try asking a little friendlier, a simple "please" would be nice ;)
Otsikko: Re: Rapidshare Checker
Kirjoitti: karlbenson - tammikuu 10, 2008, 10:44:38 AP
You would probably be better with a php/server-side script that checks maybe once a day/week.
Otsikko: Re: Rapidshare Checker
Kirjoitti: edi67 - tammikuu 10, 2008, 11:18:39 AP
Lainaus käyttäjältä: karlbenson - tammikuu 10, 2008, 10:44:38 AP
You would probably be better with a php/server-side script that checks maybe once a day/week.

yes may be.
My problem is that i have a lot of link of rapidshare, megaupload ecc in my site and many many of them are DEAD so differente forum board have script for check this link and add one icon for identify that link is dead or alive, some more professional script can also delete the topic with dead link can be very useful for forum with many link hosted in these hosting service site.