Free PHP Pinger Script

Discussion in 'Link Building' started by MeAmRussian, Jun 3, 2010.

  1. MeAmRussian

    MeAmRussian Newbie

    Mar 16, 2009
    Likes Received:
    Hey all,

    I saw a script over here that adds your site to various About/Ranking sites, and then pings them all using pingomatic:

    I got the idea of simply pinging a list of URLs using such a script, so I edited it, making some tweaks.

    Basically, upload this to your server (you'll need PHP and the cURL extension). Run the PHP file and enter the list of links you want to ping. So when you make backlinks using your software or w/e, export the list of backlinks you get and copy paste them into this script to let Google and others know about those pages.

    I changed the user agent to emulate GoogleBot, and the referrer is Google, so you shouldn't have any problems submitting too many pings.

    Here's the code:

    $domains = explode("\n", $_POST['domains']);
    foreach($domains as $domain)
    $domain = explode('|', $domain);
    $keyword = $domain[1];
    $domain = $domain[0];
    echo $keyword." - ".$domain;
    $ch = curl_init();
    	$userAgent = 'Googlebot/2.1 (';
        curl_setopt ($ch, CURLOPT_USERAGENT, $userAgent);
        curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
    	curl_setopt ($ch, CURLOPT_HEADER, 1);
        curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_REFERER, '');
        curl_setopt ($ch, CURLOPT_URL, '' . urlencode($keyword) . '&blogurl=' . urlencode($domain) . '&rssurl=http%3A%2F%2F&chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner=on&chk_syndic8=on&chk_newsgator=on&chk_myyahoo=on&chk_pubsubcom=on&chk_blogdigger=on&chk_blogrolling=on&chk_blogstreet=on&chk_moreover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_topicexchange=on&chk_google=on&chk_tailrank=on&chk_bloglines=on&chk_postrank=on&chk_skygrid=on&chk_bitacoras=on&chk_collecta=on');
        $AskApache_result = curl_exec ($ch);
        if(preg_match('/Pinging complete!/', $AskApache_result))
            echo $url . ' - Pinged!<br>';
            echo $url . ' - <b>Pinging Failed!</b><br>';
    echo "<br /><br />Submit more!<br />";
    <form method="post">
    Example:<br />|This is a keyphrase<br />|This is a keyphrase<br>
    <textarea name="domains" cols=100 rows=30></textarea><br>
    <input type="submit">

    If something like this has already been posted, I apologize and you can ignore this thread :) Once again, a lot of the credit goes to chrisking for posting the original code that I used to tweak. If someone would be nice enough to host this script on their server and post the link publicly for everyone, that would be nice.