Forum Moderators: open
Anyway i got inspired by the disccussion [webmasterworld.com...]
so quickly wrote a php (tested on PHP4.31). i can say this is very very handy for webmaster. save time to go through loads of pages type in all those "allinxxx" crap.
i call it advanced Google Checker
ranking position in top 100 result
number of page indexed
number of links
From every google datacenter(9).
Keep in mind that this php is pretty slow due to it parse about 30 pages to check it, performance also depend on your connection and speed.
This code is for educational use only, use at your own risk.
Enjoy it!
<?php
/*
File Name google.php
Advanced Google checker
Author : SPEEDMAX
HOW TO USE
[yourdomain.com...]
*/
$query = $_GET['key'];
$domain = $_GET['url'];
$numResult = 100;
// if you want to add/delete datacenter edit this line
$datacenter = array("www","www2","www3","www-ex","www-fi","www-cw","www-sj","www-ab","www-zu");
echo "Google Checker : $domain <br>";
echo '<table border=1 ><tr><td>Data Center</td><td>Ranking</td><td>No of page indexed</td><td>Inbound Link</td></tr>';
foreach($datacenter as $v){
$url="http://$v.google.com/ie?q=".urlencode($query)."&hl=en&lr=&ie=ISO-8859-1&num=100&start=0&sa=N";
$file=implode("",file($url));
$file = explode("<NOBR>",$file);
foreach($file as $key => $value){
if(eregi($domain, $value)) {
$result = $key;
}
}
echo "<tr><td>".$v."</td><td>".$result."</td>";
$url2="http://$v.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=site%3A$domain+-wx34A&num=1";
$file=implode("",file($url2));
if(preg_match("/ of about \<b\>([0-9,]*)/",$file,$text)){
echo "<td>".$text[1]."</td>";
}
$url3="http://$v.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=link%3A$domain&num=1";
$file=implode("",file($url3));
if(preg_match("/ of about \<b\>([0-9,]*)/",$file,$text)){
echo "<td>".$text[1]."</td>";
}
echo "</tr>";
}
echo "</table>";
?>
it will show like this, which is very very hard to track.
---------------------------------------------------
192.168.0.1 - - [23/Jun/2003:11:00:09 -0500] "GET /search?q=keyword HTTP/1.1" 200 4953 "-" "-"
---------------------------------------------------
i do believe even if you run this script in daily base it is okay. i mean who cares if some one download 3 page from your site compare to millons of request. :P
[edited by: speedmax at 4:46 am (utc) on June 23, 2003]
It will also be very effective at getting your ip banned by google for abuse.
I thought this myth had been debunked once and for all by GG when he confirmed in a previous thread...
...the things you mentioned are good reasons why IP address penalties are usually not a good idea. All the comments about manual penalties apply, plus it's easy for a bad guy to switch to a different IP. I haven't seen an IP-based penalty in a long time.
There are very good reasons not to make a habit of programmed interrogation of Google servers - but this does not appear to be one of them.
Overall, I highly recommend *not* hitting Google with automated queries.
Any IP that does automatic or programmatic queries can get banned, so I would use the API as the legitimate way to access Google instead.
before i thought the same. but then i realise that it only download 3 file from the same server. plus in the apache log. it will show like this, which is very very hard to track.
---------------------------------------------------
192.168.0.1 - - [23/Jun/2003:11:00:09 -0500] "GET /search?q=keyword HTTP/1.1" 200 4953 "-" "-"
---------------------------------------------------
i do believe even if you run this script in daily base it is okay. i mean who cares if some one download 3 page from your site compare to millons of request. :P
can someone else independently confirm this?
Surely, running this script a few times a day,
you could never be tracked or banned by google?
can someone explain clearly and concisely (no wish wash)
why sites like google-dance don't get banned then?
Is is becacause it's just URL/Frames, no autmatic queries
are ever sent to google?
Surely, if some php in the same pages, counted how many
times your domain appeared, that would be OK? (rather than manually look at each datacenter and try to find your domain?)
how with google tools can i do a search on our domain with a tandem keyword, and find out where we are ranked for that keyword?
i have been hitting referring URL on who's on now statistics tracking until now to find out what page we are showing up on various terms we get visitors from.
thanks anybody.
I would like to find out how I stand with each of my important keyword phrases. I can sit there and enter the phrases one at a time (which useally takes about 10 seconds between queries) or it would be quite simple to write a little auto query program that has a 10 second delay to do it for me. The impact on the bandwidth would be exactly the same.
Any opinions on this option.
Personally, I don't recommend following queries down to comparing data center by data center.