/*
Plugin Name: Pingback Optimizer
Plugin URI: http://www.pingbackoptimizer.com
Description: Optimize Your Pingbacks! - Automatically submit your pingback URLs to multiple RSS directories. Boost your search engine rankings and get more traffic!
Version: 1.4
Author:Pingback Optimizer
Author URI:http://www.pingbackoptimizer.com
*/
session_start();
ini_set("max_execution_time",1000);
add_action('comment_post','fun_comment_backup');
function fun_comment_backup($comment_id)
{
$type=get_comment_type($comment_id);
if($type=='trackback' || $type=='pingback' )
{
global $wpdb;
$tabname1=$wpdb->prefix."plu_comment_backup";
$tabname=$wpdb->prefix."comments";
$sql_sel="select * from $tabname where comment_ID=".$comment_id;
$mysqlq=mysql_query($sql_sel);
while($row=mysql_fetch_array($mysqlq))
{
$commentauthor=$row['comment_author'];
$commentconent=$row['comment_content'];
//remove special character
$commentauthor=strip_tags($commentauthor);
$commentauthor= preg_replace("/?[a-z0-9]{2,8};/i","",$commentauthor);
$commentauthor=cleansee($commentauthor);
$commentauthor=str_replace("'","",$commentauthor);
$commentauthor=str_replace("`","",$commentauthor);
$commentauthor=str_replace(",","",$commentauthor);
$commentauthor=str_replace("|","",$commentauthor);
$commentauthor=str_replace("…","",$commentauthor);
$commentauthor=str_replace("»","",$commentauthor);
$commentauthor=str_replace("-","",$commentauthor);
$commentauthor=str_replace(";","",$commentauthor);
$commentconent=strip_tags($commentconent);
$commentconent= preg_replace("/?[a-z0-9]{2,8};/i","",$commentconent);
$commentconent=cleansee($commentconent);
$commentconent=str_replace("'","",$commentconent);
$commentconent=str_replace("`","",$commentconent);
$commentconent=str_replace(",","",$commentconent);
$commentconent=str_replace("|","",$commentconent);
$commentconent=str_replace("…","",$commentconent);
$commentconent=str_replace("»","",$commentconent);
$commentconent=str_replace("-","",$commentconent);
$commentconent=str_replace(";","",$commentconent);
//remove special character
$sql_table1="insert into $tabname1 set comment_id='$comment_id',comment_post_ID='".$row['comment_post_ID']."',comment_author='".$commentauthor."',comment_author_email='".$row['comment_author_email']."',comment_author_url='".$row['comment_author_url']."',comment_author_IP='".$row['comment_author_IP']."',comment_date='".$row['comment_date']."',comment_date_gmt='".$row['comment_date_gmt']."',comment_content='".$commentconent."',comment_karma='".$row['comment_karma']."',comment_agent='".$row['comment_agent']."',comment_type='".$row['comment_type']."',comment_parent='".$row['comment_parent']."',user_id='".$row['user_id']."',status=0,date_status=0 ";
mysql_query($sql_table1);
}
}
}
function cleansee($string)
{
$test = str_replace('"', '\"', strip_tags($string));
$test = escapeshellcmd($string);
#the above statement should remove the ' but just to be on the safe side
$test = ereg_replace("'", "", $string);
return($test);
}
//mail function
add_action('init','fun_email_smashdfw');
function fun_email_smashdfw()
{
global $wpdb;
$tabname_com_backup=$wpdb->prefix."plu_comment_backup";
$upi = 0;
$updateme = get_option("hwe-to-update");
$updatefeed_randomno=get_option("hwe-to-update-feedrandomno");
if($updateme)
{
$ary_updateme = explode("*",$updateme);
while($upi <= sizeof($ary_updateme))
{
$ary_updateme[$upi];
if($ary_updateme[$upi])
{
$sql_u01="update $tabname_com_backup set status=1,feed_no='$updatefeed_randomno',date_status='".time()."' where id=".$ary_updateme[$upi];
mysql_query($sql_u01);
}
$upi++;
}
//entery feed link with date in table
global $wpdb;
$tabname_feed=$wpdb->prefix."plu_feed_backup";
$feedurl2=get_option('hwe_feed_url');
$sql_u_f="insert into $tabname_feed set date_status=".time().",feed_url='".$feedurl2."'";
mysql_query($sql_u_f);
$hwe_firstmail_no=get_option('hwe_firstmail_no');
if($hwe_firstmail_no==1)
{
//sent mail
global $wpdb;
$ins_tab=$wpdb->prefix."plu_email_option";
$fet_sql="select * from $ins_tab";
$res_fet=mysql_query($fet_sql);
$i=0;
if($res_fet)
{
while($row=mysql_fetch_array($res_fet))
{
$email_option=$row['email_option'];
$e_id=$row['email_id_save'];
$id=$row['id'];
if($email_option==8) // if enable set in configure plugin page
{
send_mail($e_id,$id);
}
$i++;
}
}
}
update_option("hwe-to-update","");
update_option("hwe-to-update-feedrandomno","");
update_option("hwe_firstmail_no",0);
}
$rnow=$_GET['rnow'];//get variable if right now button click on ping back page and if click then run sumbit immediately...
$checkcron=get_option("hwe_check_cron"); // cron time variable get
if($checkcron==1)
{
$curtime=time();
$strtotime_date_mktime_after_next=get_option("hwerun_convert_cron_after_next");
$crontime=get_option("hwerun_convert_cron");
$crondate=date("Y-m-d",$crontime);
$currentdate=date("Y-m-d");
$lastdate=get_option("hwe_lastsend");
}
/*echo "currenttime:'".$curtime."'strtotime_date_mktime_after_next:'".$strtotime_date_mktime_after_next."'currendate:'".$currentdate."'lastdate:'".$lastdate."'";*/
//if match cron run acording to days set in pingback page.
if($curtime >= $strtotime_date_mktime_after_next && $checkcron==1) // cron time variable check
{
$selday=get_option("hwe_selday");
if($selday==100) // if every hour select in configure plugin
{
$nextmail=$strtotime_date_mktime_after_next+60*60;
update_option("hwerun_convert_cron_after_next",$nextmail);
update_option("hwe_lastsend",$currentdate);
update_option("hwe_lastsend_mktime",time());
submit_feeds();
update_option("hwelast_run",time());
}
else// if day select in configure plugin
{
if($lastdate!=$currentdate) //this condition stop submit feed same day.
{
$nextmail=$curtime+$sel_days*24*60*60;
update_option("hwerun_convert_cron_after_next",$nextmail);
update_option("hwe_lastsend",$currentdate);
update_option("hwe_lastsend_mktime",time());
submit_feeds();
update_option("hwelast_run",time());
}
}
}
//submit right now
if($rnow==1)
{
submit_feeds();
update_option("hwe_lastsend_mktime",time());
update_option("hwelast_run",time());
}
}
function submit_feeds()
{
global $wpdb;
$tabname_comment=$wpdb->prefix."comments";
$tabname_com_backup=$wpdb->prefix."plu_comment_backup";
$readurl=get_option('hwe_urlfeed');
if($readurl=="") { $readurl=20; }
$limitread=get_option('hwe_selday');
$sq9 = "select * from $tabname_com_backup where status=0 limit 0,".$readurl;
$posts9 = mysql_query($sq9);
$numrow=0;
$updateme="";
while($row01=mysql_fetch_array($posts9))
{
$id3=$row01['id'];
$updateme.=$id3."*";
$comment_id=$row01['comment_id'];
//comment submit in feed then delete
global $wpdb;
$tabname_comment=$wpdb->prefix."comments";
$sql_del="delete from $tabname_comment where comment_ID=".$comment_id;
mysql_query($sql_del);
$numrow=1;
}
update_option("hwe-to-update",$updateme);
$rand_feedno= generateRandomString();
update_option("hwe-to-update-feedrandomno",$rand_feedno);
update_option("hwe_firstmail_no",1);
//for submit on site
$feedurl=get_option('siteurl')."/?feedno=".$rand_feedno;
//for submit on site
update_option("hwe_feed_url",$feedurl);
if($numrow>0)
{
include_once(WP_PLUGIN_DIR.'/pingback_optimizer/extensions/comon1.class.php');
$feed_colectors1 = rss_optimizer_get_extensions1();
//this loop submit feed in sites..
foreach($feed_colectors1 as $feed_collector1)
{
require_once(WP_PLUGIN_DIR.'/pingback_optimizer/extensions/'.$feed_collector1.'.submit.class.php');
$feed_collector_class1 = new $feed_collector1();
$feed_collector_class1->do_ping($feedurl);
}
//this loop submit feed in sites..
}
}
function send_mail($eid,$id)
{
$email_from = get_option('admin_email'); // Who the email is from
//$email_from=str_replace("http://","",$email_from);
$email_subject = "PingbackOptimizer: Feed Submited Successfully"; // The Subject of the email
$email_message = "Pingback Optimizer! ";
/*
global $wpdb;
$tabname_com_backup=$wpdb->prefix."plu_feed_backup";
echo $sq11 = "select * from $tabname_com_backup order by id desc limit 0,1";
$posts11 = mysql_query($sq11);
while($row11=mysql_fetch_array($posts11))
{
echo $feedurl1=$row11['feed_url'];
}*/
$feedur90=get_option("hwe_feed_url");
$email_message.= "Last submit feed url "."\n";
$email_message.= $feedur90;
$headers="From:".$email_from."\n";
$headers.="Reply-to:".$email_from."\n";
//mail user
mail($eid, $email_subject, $email_message, $headers);
//mail owner
}
function generateRandomString($length = 20, $letters = '1234567890QWERTYUIOPASDFGHJKLZXCVBNM')
{
$s = '';
$lettersLength = strlen($letters)-1;
for($i = 0 ; $i < $length ; $i++)
{
$s .= $letters[rand(0,$lettersLength)];
}
return $s;
}
function rss_optimizer_get_extensions1() {
$items1 = scandir(WP_PLUGIN_DIR.'/pingback_optimizer/extensions');
foreach($items1 as $item1)
{
$file_items1 = explode('.', $item1);
if (count($file_items1) > 2) {
$extension1 = array_pop($file_items1);
$sufix1 = array_pop($file_items1);
$prefix1 = array_pop($file_items1);
if ('php' == $extension1 && 'class' == $sufix1 && 'submit' == $prefix1) {
$class1 = array_pop($file_items1);
$class_crc32 = crc32($class1);
// if (get_option("rsso_{$class_crc32}", TRUE))
// {
$submit_classes1[] = $class1;
// }
}
}
}
return $submit_classes1;
}
add_action('admin_footer', 'process_exist_ping');
function process_exist_ping()
{
$if_process=get_option("hwe_process_exist_ping");
if($if_process==1)
{
global $wpdb;
$tabname22=$wpdb->prefix."comments";
$sql_sel22="select * from $tabname22 where comment_type='pingback'";
$sql_sel_res22=mysql_query($sql_sel22);
$five_count=1;
while($row22=mysql_fetch_array($sql_sel_res22))
{
if($five_count<=100)// one time 5 ping back process
{
$countrow22=0;
global $wpdb;
$tabname_backup=$wpdb->prefix."plu_comment_backup";
$sql_sel="select * from $tabname_backup where comment_id=".$row22['comment_ID'];
$sql_sel_res=mysql_query($sql_sel);
if($sql_sel_res)
{
$countrow22=mysql_num_rows($sql_sel_res);
}
if($countrow22==0) // not duplicate
{
$commentauthor=$row22['comment_author'];
$commentconent=$row22['comment_content'];
$commentauthor=strip_tags($commentauthor);
$commentauthor= preg_replace("/?[a-z0-9]{2,8};/i","",$commentauthor);
$commentauthor=cleansee($commentauthor);
$commentauthor=str_replace("'","",$commentauthor);
$commentauthor=str_replace("`","",$commentauthor);
$commentauthor=str_replace(",","",$commentauthor);
$commentauthor=str_replace("|","",$commentauthor);
$commentauthor=str_replace("…","",$commentauthor);
$commentauthor=str_replace("»","",$commentauthor);
$commentauthor=str_replace("-","",$commentauthor);
$commentauthor=str_replace(";","",$commentauthor);
$commentconent=strip_tags($commentconent);
$commentconent= preg_replace("/?[a-z0-9]{2,8};/i","",$commentconent);
$commentconent=cleansee($commentconent);
$commentconent=str_replace("'","",$commentconent);
$commentconent=str_replace("`","",$commentconent);
$commentconent=str_replace(",","",$commentconent);
$commentconent=str_replace("|","",$commentconent);
$commentconent=str_replace("…","",$commentconent);
$commentconent=str_replace("»","",$commentconent);
$commentconent=str_replace("-","",$commentconent);
$commentconent=str_replace(";","",$commentconent);
$sql_table1="insert into $tabname_backup set comment_id='".$row22['comment_ID']."',comment_post_ID='".$row22['comment_post_ID']."',comment_author='".$commentauthor."',comment_author_email='".$row22['comment_author_email']."',comment_author_url='".$row22['comment_author_url']."',comment_author_IP='".$row22['comment_author_IP']."',comment_date='".$row22['comment_date']."',comment_date_gmt='".$row22['comment_date_gmt']."',comment_content='".$commentconent."',comment_karma='".$row22['comment_karma']."',comment_agent='".$row22['comment_agent']."',comment_type='".$row22['comment_type']."',comment_parent='".$row22['comment_parent']."',user_id='".$row22['user_id']."',status=0,date_status=0 ";
mysql_query($sql_table1);
$five_count++;
}
}
if($five_count>100)
{
break;
}
}
}
}
register_activation_hook(__FILE__,"fun_create_table_smashdfw");
function fun_create_table_smashdfw()
{
global $wpdb;
$tabname=$wpdb->prefix."plu_email_option";
$sql_table="CREATE TABLE $tabname (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email_option` INT NOT NULL ,
`email_id_save` TEXT NOT NULL ,
`email_date` VARCHAR(255) NOT NULL
)";
mysql_query($sql_table);
$tabname3=$wpdb->prefix."plu_comment_backup";
$sql_table3="CREATE TABLE $tabname3 (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`comment_id` BIGINT NOT NULL ,
`comment_post_ID` BIGINT NOT NULL ,
`comment_author` tinytext NOT NULL ,
`comment_author_email` VARCHAR(100) NOT NULL,
`comment_author_url` VARCHAR(200) NOT NULL,
`comment_author_IP` VARCHAR(100) NOT NULL,
`comment_date` datetime NOT NULL,
`comment_date_gmt` datetime NOT NULL,
`comment_content` text NOT NULL,
`comment_karma` INT NOT NULL ,
`comment_agent` VARCHAR(255) NOT NULL,
`comment_type` VARCHAR(20) NOT NULL,
`comment_parent` BIGINT NOT NULL,
`user_id` BIGINT NOT NULL,
`status` BIGINT NOT NULL,
`date_status` TEXT NOT NULL ,
`feed_no` TEXT NOT NULL
)";
mysql_query($sql_table3);
$tabname3=$wpdb->prefix."plu_feed_backup";
$sql_table3="CREATE TABLE $tabname3 (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`date_status` TEXT NOT NULL ,
`feed_url` TEXT NOT NULL
)";
mysql_query($sql_table3);
update_option("hwe_urlfeed",20);
update_option("hwe_selday",7);
update_option("hwe_txtmail",get_option('admin_email'));
update_option("rss_optimizer_cron",1);
update_option("hwe_license",0);
update_option("hwe_check_cron",0);
update_option("hwe_process_exist_ping",0);
update_option("hwe_firstmail_no",0);
}
register_deactivation_hook(__FILE__,'myplugin_activate_p');
function myplugin_activate_p()
{
update_option("rss_optimizer_cron",0);
update_option("hwe_lic",0);
update_option('valid_email','');
update_option('valid_api_key','');
update_option('hwelast_run','');
}
add_action("admin_menu","fun_menu_smashdfw");
function fun_menu_smashdfw()
{
add_menu_page("","Pingback Optimizer",8,__FILE__,"funsubexport_main");
add_submenu_page(__FILE__,"","",10,__FILE__,"funsubexport_main");
add_submenu_page(__FILE__,"Configure Plugin","Configure Plugin",10,"funpingbackfeed","funpingbackfeed");
add_submenu_page(__FILE__,"Existing Pingback","Existing Pingback",10,"funprfeed","funprfeed");
add_submenu_page(__FILE__,"Export Mgmt","Export Mgmt",10,"funsubexport","funsubexport");
add_submenu_page(__FILE__,"Comment Mgmt","Comment Mgmt",10,"funsubcomment","funsubcomment");
add_submenu_page(__FILE__,"Submission Report","Submission Report",10,"funsubreport","funsubreport");
add_submenu_page(__FILE__,"License","License",10,"funlic","funlic");
}
function funprfeed()
{
$_SESSION['nofeedsub']=0;
$giff=$_GET['giff'];
if($giff)
{
include("process.php");
?>
}
if(!$giff)
{
$licno=get_option("hwe_license");
if($licno==0)
{
include("old_process_trackback.php");
}
else
{
}
}
}
function funlic()
{
include("licence.php");
}
function funpingbackfeed()
{
$rnow=$_GET['rnow'];
$licno=get_option("hwe_license");
if($rnow)
{
include("process.php");
?>
}
if($rnow=="")
{
$licno=get_option("hwe_license");
if($licno==0)
{
include("pingbackfeed.php");
}
else
{
}
}
}
function funsubreport()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==0)
{
include("submission_report.php");
}
else
{
}
}
function funsubexport()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==1)
{
include("export_mgmt.php");
}
else
{
}
}
function funsubexport_main()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==0)
{
include("includeplu.php");
}
else
{
}
}
function funsubcomment()
{
$_SESSION['nofeedsub']=0;
$licno=get_option("hwe_license");
if($licno==0)
{
include("comment_trackback.php");
}
else
{
}
}
add_action('init','fun_writefeed');
function fun_writefeed()
{
$feedno=$_REQUEST['feedno'];
$filepath=WP_CONTENT_DIR."/uploads/myfeed.xml";
$fileurl=WP_CONTENT_URL."/uploads/myfeed.xml";
$home=get_option('siteurl');
if($feedno)
{
$xmlf=''."\n";
$xmlf.=''."\n";
$xmlf.='Comments for Wordpress Blog '."\n";
$xmlf.=' '."\n";
$xmlf.=' '.$home.''."\n";
$xmlf.=''.get_option('siteurl').' '."\n";
$xmlf.='http://wordpress.org/?v=3.0 '."\n";
global $wpdb;
$sel_tab=$wpdb->prefix."comments";
$tabname_com_backup=$wpdb->prefix."plu_comment_backup";
$sql_sel="select * from $tabname_com_backup where feed_no='$feedno'";
$mysqlquery=mysql_query($sql_sel);
while($row=mysql_fetch_array($mysqlquery))
{
$com_con=$row['comment_content'];
$com_dat=$row['comment_date'];
$a = $com_dat;
$arr = explode("-",$a);
$day = (int)$arr[2];
$month = (int)$arr[1];
$year = (int)$arr[0];
$en_datec = mktime(0,0,0,$month,$day,$year);
$newdate=(gmdate(DATE_RFC2822,$en_datec));
$comment_author=$row['comment_author'];
$comment_author_url=$row['comment_author_url'];
$post_title=$row['fetch_post_title'];
$posttitle=get_the_title($row['comment_post_ID']);
$compostid=$row['comment_post_ID'];
$comid=$row['comment_ID'];
$xmlf.='- '."\n";
$xmlf.='
'.$comment_author.' '."\n";
$xmlf.=' '.$comment_author_url.''."\n";
$xmlf.=''.$comment_author.' '."\n";
$xmlf.=''.$newdate.' '."\n";
$xmlf.=''.$comment_author_url.' '."\n";
$xmlf.=''.$com_con.' '."\n";
$xmlf.=''.$com_con.'
'."\n";
$xmlf.=']]>'."\n";
$xmlf.=''."\n";
}
$xmlf.=''."\n";
$xmlf.=''."\n";
header ("content-type: text/xml");
echo $xmlf;
die();
}
}
?>
Arcade Flash Games - Play Free Online Games
Login to submit your scores
Featured Games
My Word!
My Word! is a word game seemingly in the traditional mold, but several features set it apart from other games ..
Cannon Block 2
Cannon Block 2 is the second release to the Cannon Block family.
It has 15 new levels + the 15 old ones (30 a..
Oblit
Oblit
Zombie Racers Score Attack
Zombie Racers Score Attack
Top Fruits Slots
Classic 3-Reel Fruit Machine. Top Fruits Slots are submitted by symbols Pineapples, Lemons, Oranges, Apples an..
HeliAssult Redux
A revision of the Chopper game where you fly through a battlefield chasing a specified target within a time li..
Slot Car Grand Prix
The race is on! Put your car on the tracks and burn some rubber. There is a challenger for everyone in this fa..
Power Pinball
Pinball, with powerups. Tag different groups of mushrooms to activate special modes, get huge bonuses and poin..
Mobster Defense
Your mob has to stop waves of civilians from escaping their loans. Use your advanced weaponry and skill to mak..
American Dirt Bike
A challenging dirt bike game, try to complete the 7 tracks as quickly as you can. This American hero is drivin..
Bowja the Ninja
Bowja the Ninja
Shooting Mayhem
Shoot the red targets to get score, the reload to get more ammo. The more combo you get the faster the targets..
Cap’n GoldGrubber’s Treasure Hunt
Cap’n GoldGrubber’s Treasure Hunt
Halloween Sugar Chaser
Halloween Sugar Chaser
Find the Heroes World – Porto
Our hero is sad because he thinks there are no more heroes in this world.
Now he travels to Porto, in Portugal..
Eye of the Falcon Hunter
Eye of the Falcon Hunter