I posted this pver on Andrew's thread in "shooting the shit", but I thought It would be worth making it's own thread. So that you don't end up sending traffic to dead or redirected campaigns... like those dreaded azg smilies. I wrote this little page checking script.
Put all your offers in a db table like with fields: html, url, desc, company, affid
Then insert the offers you are running with the copied html from the source of the landing page. Then run this script on a cron and it'll check if the landing page has changed. If it changes it'll email you. Then you can go see what's going on.
Someone else could ad a sql dump file to this as well I'm just to lazy. I didn't debug it so it might have an error or two but you get the basic idea!
<?
DBConnect();
$sql = "SELECT * FROM offers";
$sql_out = mysql_query($sql) or die(mysql_error());
while ( $row = mysql_fetch_assoc($sql_out)){
$orig_html = $row['html'];
$affiliate_url = $row['url'];
$description = $row['desc'];
$company = $row['company'];
$affiliate_id = $row['affid'];
$scrapedhtml = file_get_contents($affiliate_url);
$compare_result = strcmp( $scrapedhtml,$orig_html);
if(!$compare_result){
mail('changes@mail.com','Offer '.$description.' has changed!',"Your link for ".$description." has changed. It's hosted by ".$company." under affiliate ID".$affid.". Check this url ".$affiliate_url );
}
}
?>
Put all your offers in a db table like with fields: html, url, desc, company, affid
Then insert the offers you are running with the copied html from the source of the landing page. Then run this script on a cron and it'll check if the landing page has changed. If it changes it'll email you. Then you can go see what's going on.
Someone else could ad a sql dump file to this as well I'm just to lazy. I didn't debug it so it might have an error or two but you get the basic idea!
<?
DBConnect();
$sql = "SELECT * FROM offers";
$sql_out = mysql_query($sql) or die(mysql_error());
while ( $row = mysql_fetch_assoc($sql_out)){
$orig_html = $row['html'];
$affiliate_url = $row['url'];
$description = $row['desc'];
$company = $row['company'];
$affiliate_id = $row['affid'];
$scrapedhtml = file_get_contents($affiliate_url);
$compare_result = strcmp( $scrapedhtml,$orig_html);
if(!$compare_result){
mail('changes@mail.com','Offer '.$description.' has changed!',"Your link for ".$description." has changed. It's hosted by ".$company." under affiliate ID".$affid.". Check this url ".$affiliate_url );
}
}
?>