1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Free PHP Pinger Script

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

  1. MeAmRussian

    MeAmRussian Newbie

    Joined:
    Mar 16, 2009
    Messages:
    22
    Likes Received:
    4
    Hey all,

    I saw a script over here that adds your site to various About/Ranking sites, and then pings them all using pingomatic: http://www.blackhatworld.com/blackhat-seo/link-building/161848-my-free-script-get-70-high-page-ranking-backlinks.html

    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:


    Code:
    <?
    set_time_limit(900);
    
    if($_POST)
    {
    
    $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 (http://www.googlebot.com/bot.html)';
        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, 'http://www.google.com/');
    
        curl_setopt ($ch, CURLOPT_URL, 'http://pingomatic.com/ping/?title=' . 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>';
        }
        else
        {
            echo $url . ' - <b>Pinging Failed!</b><br>';
        }
        
        flush();
        ob_flush();
    
    }
    echo "<br /><br />Submit more!<br />";
    }
    ?>
    <form method="post">
    Example:<br />
    http://www.domain.com/dir/firstlink.html|This is a keyphrase<br />
    http://www.another.com/URL_HERE.php|This is a keyphrase<br>
    <textarea name="domains" cols=100 rows=30></textarea><br>
    <br>
    <input type="submit">
    </table>
    </form>

    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.