Sparedirectory




Just another WordPress weblog
Latest Links | Top Hits | Submit a Link | Contact | Web site log

Web log to sparedirectory.com

Pages
  • About
Recent Posts
  • Roulette links
  • Andersons School Spirit
  • Postcards
  • Car leasing - link 285
  • Business cards - link 284
Archives
  • November 2008
  • March 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
Blogroll
  • Ask jeves blog
  • godaddys blog
  • Google blog
  • Netscape
  • Yahoo blog
Directories
  • agoodirectory
  • Sparedirectory
Other sites
  • Play free games
  • www.afkf.com

Block spam URL’s

This is a simple php mod i have made in order to block certain websites from submitting to my directory after i started getting a few spam submissions.

Open submit.php and Find
$data['URL'] = “http://”.$data['URL'];

Add below
require_once 'spamlist.php';

—————————-
Create a file called “spamlist.php” and insert the following

<?
$bansite[0] = ‘aceroot.info’;
$bansite[1] = ‘orgfree.com’;
$bansite[2] = ‘ase3dj.info’;
// add more above if needed

$count = count($bansite);
for($i = 0; $i <= $count-1; $i++)
{
  if (strpos($data['URL'], $bansite[$i]) == True)
  {
  echo "<h1>The domain $bansite[$i] is banned for spamming</h1>";
  exit;
  }
}

//if [/URL] or http:// is found in description then stop and exit.
if (strpos($data['DESCRIPTION'], "[/URL]") == True){exit;}
if (strpos($data['DESCRIPTION'], "[/url]") == True){exit;}
if (strpos($data['DESCRIPTION'], "http://") == True){exit;}

?>

——— Upload both files

Filed under: Directory mods by links @ 2:43 pm January 14, 2007

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.


Copyright - © www.sparedirectory.com all rights reserved.