Martin Camitz - 2008-11-03

I'm trying to cheat geobytes. Not on the scale of paying 500 for 10000 hits. It'll be more lite 6. Anyway here's the code I'm using. Why doesn't it work?

<?php
    require('Snoopy.class.php');
    $snoopy = new Snoopy;
    $snoopy->agent = "Mozilla/4.0";
   
    $url = "http://www.geobytes.com/IpLocator.htm";

    if(!$snoopy->fetch($url)) {
        break;
    }

    $req = array();
    $req['cid'] = '0';
    $req['c'] = '0';
    $req['Template'] = 'iplocator.htm';
    $req['ipadress'] = '58.187.109.153';
    $req['submit'] = 'Submit';
    var_dump($req);
    echo $snoopy->submit('http://www.geobytes.com/IpLocator.htm?GetLocation', $req);

    echo "<br>response_code: ";var_dump($snoopy->response_code);echo "<br>";
    echo "referer: ";var_dump($snoopy->referer);echo "<br>";
    echo "headers: ";var_dump($snoopy->headers);echo "<br>";
    echo "error: ";var_dump($snoopy->error);echo "<br>";
    echo $snoopy->result;

/*

<form method="POST" action="IpLocator.htm?GetLocation">
<input type="hidden" name="cid" value="0">
<input type="hidden" name="c" value="0">
<input type="hidden" name="Template" value="iplocator.htm">
<h3>IP Address to locate:<input type="text" name="ipaddress" size="15" value="58.187.109.153">&nbsp;<input type="submit" value="Submit">
</h3>

</form>
*/
?>