<?

/*
Plugin Name: HTMLTaintCheck
Plugin URI: http://www.seoegghead.com/
Description: Checks for suspicious links in posts. MAKE SURE TO REPLACE YOUR
EMAIL ADDRESS IN THE CODE BELOW — ALSO ONLY LEAVE THIS ON TO CHECK, THEN TURN IT BACK OFF!!!

Author: Jaimie Sirovich
Version: 0.1
Author URI: http://www.seoegghead.com/
*/ 

if (true) {
  
check_posts();
}

function check_posts()
{    

    global $wpdb$table_prefix;

    $items $wpdb->get_results("

        SELECT post_title, ID, post_name, post_content

        FROM {$table_prefix}posts

        WHERE TRUE
    ");    
    
    
$copy ";
    
    foreach (
$items as $i) {
        if (
preg_match('#adshelper|softicana#i'$i->post_content)) {
            
$copy .= $i->ID ' ' "IS SUSPICIOUS.\r\n";
        } else {
            
$copy .= $i->ID ' ' "OK.\r\n";
        }
    }
    
    
mail('YOUREMAIL@ADDRESS.com', 'test', $copy);    
}

?>

Tell an amigo:
  • Sphinn
  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Facebook



Related posts:
Code for HTML Auditing <? // +———————————————————————-+ // | HTMLParser                                                           | // | Simple HTML Parsing Library                                          | // | Based on Jose Solorzano's Library; his notice is below.              | // +———————————————————————-+ // | Portions Copyright (c) 2004-2005 Jaimie Sirovich                     | // +———————————————————————-+ // | This program is free software; you can redistribute it and/or        |...
Updated PagerFix Plugin Code For WP 2.1 I upgraded to WordPress 2.1 today, and one of my...
How To Get Dugg More: Digg for WordPress Plugin So I got Dugg — but I'm convinced this trivial...
Stop SEO Death By Pagination This post is now (mostly) obsolete and replaced by WordPress...
Reddit for WordPress Plugin This is a terribly simple but useful WordPress plugin that...