I was just playing around with PHPLD (PHP Link Directory Script) recently and the most annoying feature in that great script is the lack of a “APPROVE-ALL” button. While, I can understand that such a feature has not been given by default in order to curtail “spam” as lazy people like me would just approve all links without having to look through each one of them.

That would mean more number of Viagra,Pharmacy,Arms, Porn sort of stuff getting listed in directories by the owner who are too lazy manually approve them.

So, here is a nifty piece of code, that you need to put in your “admin” directory and just run this file from you browser. It will automatically “Approve” all pending links.

NOTE: You should keep in mind that this is to be used only after you have manually seen that there are no spam links, otherwise, this code can mean reduction of quality of your directories.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
 
//PHPLD APPROVE ALL LINKS code snippet
// CReated by Akshay Jain http://akshayjain.org
//You are free to use this code as you want. Please do not remove the above credits.
 
$db_server   = 'localhost';      //leave this unchanched if u dont know what this is.
$db_name     = 'yourdatabasenamegoeshere';
$db_username = 'database username goes here';
$db_password = 'database password goes here';
 
 $dbconnection = @mysql_connect($db_server,$db_username,$db_password);
 $db = mysql_select_db($db_name);
 
$result = mysql_query("UPDATE PLD_LINK SET status='2' WHERE status='1'")
or die(mysql_error());  
 
?>

You can download this code from here: CODE
Note: Please rename this file to .php instead of .txt before uploading.