Search:
Main Menu
Login | RSS |

Quick PHP Code Tips and Examples

PHP Programming Tips, Tutorials and Source Code Examples for newbie

PHP Code to check and verify Splog (Spam Blog)

March 6th, 2007 by Jon Moffet

Spam blog or splog is a nuisance, it is a blog which consists of content largely taken from other website without any modification. The primary motivation for creating splog is for getting a top searching placement and getting profit from Pay-Per-Click advertisement.

If not monitored closely, Spam blog can be harmful to content searching where it pollutes search engine with copycat content or articles which has no value at all.

Luckily there is a service which lets you identify spam blog, antisplog.net which contains database of well known spam blogs.

Antisplog provide a simple api which you can use to check whether the given website url is a splog or otherwise, this can be use to integrate AntiSplog functionality right into your own web application in order to weed out spam blog listing in your website.

Here's the sample code to check spam blog using AntiSplog api :

PHP:
  1. function isSplog($url)
  2. {
  3.    
  4.     $resp=new Snoopy();
  5.     preg_match("/^(http:\/\/)?([^\/]+)/i",$url, $matches);
  6.     $host = $matches[2];
  7.     $resp->fetch("http://antisplog.net/check/". $host);
  8.    
  9.     if($resp) {
  10.         if ($resp->results == 1) {
  11.             return true;
  12.         }
  13.     }
  14.     return false;
  15. }

The code will return 'true' if the url given is an splog, or 'false' otherwise. For maximum compatibility, the code require the use of Snoopy HTTP Client in order to retrieve the codes from AntiSplog server.

You can download the isSplog function library here : issplog.zip

Tags: , , , , , ,

Bookmark Post:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • NewsVine
  • Reddit
  • Netvouz
  • Spurl
  • Furl
  • digg
  • YahooMyWeb
  • del.icio.us

Posted in Uncategorized |

Related Posts

One Response

  1. Blogmarks.net : Public marks Says:

    Kramer auto Pingback[...] php tips java library xml-rpc [...]

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.