include 'Snoopy.class.php'; //Download snoopy.sourceforge.net
$tb = array();
//One trackback url per line in file
$lines = file('tb-list-1.txt');
// Data submitted from the form on this script
$tb['blogName'] = "Buy Cocaine"; //Blog name, may not be displayed
$tb['blogEntryTitle'] = "Buy Viagra"; //Anchor text for link
$tb['blogEntryURL'] = "http://www.fbi.gov"; //URL you want to be linked
$tb['blogExcerpt'] = "We are one of the best resources in our field. Visit us for all your needs and order instantly online.";
function Tbsend($tb) {
// Send trackback ping and display results
// For specifications, see http://www.movabletype.org/docs/mttrackback.html
$snoopy = new Snoopy;
$submitURL = $tb['tbURL'];
$submitVars['Content-Type'] = 'application/x-www-form-urlencoded';
$submitVars['charset'] = 'utf-8';
$submitVars['title'] = $tb['blogEntryTitle'];
$submitVars['url'] = $tb['blogEntryURL'];
$submitVars['blog_name'] = $tb['blogName'];
$submitVars['excerpt'] = $tb['blogExcerpt'];
$snoopy->submit($submitURL, $submitVars);
$pingReply = $snoopy->results;
// search through XML reply for any ping errors
echo ' URL: '.$submitURL.'';
if (ereg('([01]) ', $pingReply, $pieces)) {
$pingError = $pieces[1];
}
else {
$pingError = 1;
}
if (!$pingError) {
$message = 'Trackback was successful!';
}
else {
if (ereg('(.{0,}) ', $pingReply, $pieces)) {
$message = 'Error: '.$pieces[1];
}
else {
$message = 'Error: Unknown';
}
}
echo ''.$message.'
'."\n";
}
foreach ($lines as $line_num => $line) {
$tbline = $line;
$tb['tbURL'] = $tbline;
Tbsend($tb);
}
?>
http://blog.cyb.de/beispiele/trackback_spammer.php.txt
Комментариев нет:
Отправить комментарий