vb Linkchecker Bot

MobileHacks

New Member
------------------------------------
DESCRIPTION
------------------------------------

1) Checks Rapidshare.de , Rapidshare.com , Sendspace.com , Megaupload.com , Megashares.com , Depositfiles.com and Mediafire.com links.
Uses file_get_contents for all hosts except megashares to check links. Uses cURL to check megashares because it requires cookies to be set.
2) Works for post uncoded , coded , quoted and using URL BBCode.
3) Bins the post if more than specified percent of dead links are found , pms the user about it and posts in that topic
4) If all links are alive it adds specified message at the end of the post and the description.
5) If some links are live and some are dead i.e less than specified % , it makes a thread in a specified forum about it
6) If no relevant links are found ie no RS and blah blah links it adds to the ignore list. If you want the LC to check ignored links it can be accessed by ?

checki to the url of bot.php
7) Very light weight and just one file and easy to the messages posted , the forums checked.
8) Uses 3 ways to access the posts where first way is
i) The topics have not been checked even once
ii) If first method doesnt work it checks for time difference where it checks the topics where 24 hours have passed after checking.
iii)If second method doesnt work it checks all the topics.
9) The scripts stops for 15 seconds after check 20 topics or 50 links to prevent any wrongful binning and checking.

------------------------------------
CONFIGURATION
------------------------------------

First goto phpmyadmin and execute this queries:

ALTER TABLE `vb_thread` ADD `time_check` INT( 10 ) NOT NULL DEFAULT '0' AFTER `taglist` ;
ALTER TABLE `vb_thread` ADD `ignore_check` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `time_check` ;

Where vb_ is the forum table prefix.

Then configure the user set variables in vbbot.php as follows:

------------------------------------
USER CONFIGURABLE VARIABLES
------------------------------------

require_once "includes/config.php"; //assumes this is in vb folder - path it accordingly
$trash = '4'; //Forum id of trash
$botid = '2'; //Userid of bot
$botname = 'Bot'; //Username of bot
$check = '`forumid` = 2'; //Forums to check
$pa = 'Links checked on ' . date('d/m/y'). ' by link checker bot'; //This will append this at the end of the checked post
$ppa = '<br /> Links checked on ' . date('d/m/y'). ' by link checker bot'; //VB uses a caching technique, this will append it to end of parsed post. This is

HTML!
$perd = '75'; //Percent decision variable.
$tr = "More than $perd percent on the links are dead that is why the topic is moved to trash"; // This is the reply in the topic.
$pmt = 'I have moved your topic to trash'; // PM Title
$reportforumid = '5'; //This is where bot will make new topics stating reports
$showurl = 'http://maxwcoders.com/vbbot/showthread.php?t='; //Your URL

At around line 250 u'll find this:

$pms = "Hey,I'm the LC Bot. \n Your topic has been moved to trash since the links in it were dead. \n Please check it out.If u suppose the I am wrong, don't

PM me, but PM any of the staff members of the site \n";

Edit this to change your PM message.

------------------------------------
SUPPORT
------------------------------------

Once this is done, the bot is ready to go. When the bot is run, it will create a botruns.txt which will have some data for stopping multiple instances of the bot to run.

http://yourdomain.com/bot.php?deletefile - This will delete that file and run the bot again... the function of botruns.txt is to prevent another instance of

bot while it is already running.

If everything was done right, the bot will run fine.

------------------------------------

------------------------------------
Edit : File updated... a bug fixed...
Downloads below as attachments
 

moiz615

New Member
awesome man! this is very helpfull! i have 3-4 mods who check links i need to kick them :p after this ASAP haha
 

GgAcE

New Member
Amazing mod for sites that really on rapidshare & megauplod sites such as DVD & game downloads.

Great add =)
 

GgAcE

New Member
Yes this works but requires some basic webbased knowledge to run.

I have mine run every 24 hours & moves threads that have dead links to a trash can.

Very neat & will REALLY keep the community clean.
 

GgAcE

New Member
silent assassin said:
seriously how do i do this? can someone explain it to em in more unintelligent terms?
Ummm the guide is the best way to explain it. That IS in fact the dulled down version.
 

silent assassin

New Member
ok, i did this and ran the bot. after that i started getting all these errors and my site started lagging. and now i get 500 internal server errors wheni try to load the page. wut do i do?
 

GgAcE

New Member
silent assassin said:
ok, i did this and ran the bot. after that i started getting all these errors and my site started lagging. and now i get 500 internal server errors wheni try to load the page. wut do i do?

Did you complete the phpmyadmin query's properly?
 
Top