PHP script to check rankings?

I know that checking rankings automatically is frowned upon by google, but I am looking for a decent script that can check multiple keywords/urls and in multiple countries writen in PHP.

i know there are tools available, but i need this as a script to build into the client area of my site, and possibly generate reports.

anyone got any ideas where i could get such a script or even if it is possible? i'm sure it could be done with a decent list of proxies?
 

upsite

Free Member
Mar 15, 2011
106
25
It's definitely possible but would also be long winded. It would have to be a case of screen scraping - parsing the code of the Google results page and programmatically working out how to identify each result's position.

I'm not aware of any scripts that can do it. I've used a couple of iPhone apps in the past to track rankings, but each of them stopped working after a few weeks - probably due to changing in Google's HTML and SERP layout.
 
Upvote 0

ClicProject

Free Member
Aug 5, 2011
56
9
You will probably have to write it yourself. It´s a nuisance these days as you have all different types of serps depending on the keyword, some are local, some are products, some images, some videos, rich snippets etc, not to mention variations in results depending on geolocation..

Plus you are going to want to use proxies, as google will temporarily ban your ip if you do even moderate amounts of automated queries.

Perhaps you should look into using an api such as that of authoritylabs.com, however you still have to pay.

Also, there are hacks you can add to google analytics code to get it to report the ranking of a keyword when someone clicks through to your site, perhaps you could set this up and pull in the data to your script through the analytics api?
 
Upvote 0

zigojacko

Free Member
Dec 7, 2009
3,795
1,222
Plymouth, UK
clubnet.digital
We've just built quite a few. It's not a simple process though because if you haven't got an old AJAX Soap Google Search API, you have to find alternative methods.

Scraping the SERPs means excluding a range of classes and id's and the hundreds of other factors in order to get the rankings correct (as search engines can stuff lots of other results and ads on a SERP page now) and whenever there is a change (frequently), it all needs manually updating.

There are tons online, 99.9% of them probably won't work properly though as they were developed against a previous version / layout of a SERP.
 
Upvote 0

Latest Articles

Join UK Business Forums for free business advice