* Update, Nov 9th 2009: Updated code to work with a change with Yahoo.
Ranking Reporter is a free PHP script/program that allows you to track the rankings / positions of your Website in Google and Yahoo for as many keywords as you like. This release is being made in an effort to make positive contibutions to the community, and it comes with no warranty, either expressed or implied.
Download Ranking Reporter v 0.99.1 (.zip, 10 KB - Nov 9. 2009).
Here's a copy of the README file:
Darrin Ward's Google & Yahoo Ranking Position Reporter
Version 0.99.1 (Pre-release) - Nov. 9 2009
Copyright Darrin J. Ward < > - http://www.DarrinWard.com
------------------------------------------------------------------
LICENSE AGREEMENT:
--------------------
You use it, then you take full responsibility.
You may NOT redistribute this script, or distribute any modified version, unless you obtain written approval from me in advance.
--------------------
ABOUT THIS SCRIPT:
--------------------
This is a PHP/MySQL script that will take a list of keywords and check for a given site's ranking position in Google & Yahoo for each keyword (organic results only).
I'm releasing this script in-kind. I figure that, given I've spent the time to develop it, I may as well share with my SEO brethren. I'm using a slightly modified version that does multiple engines, but other than that, this is pretty much that we use internally at my company for reporting.
Please don't be lame - read this file in its entirety so you can get the system up and running.
--------------------
HOW IT WORKS:
--------------------
The script will accept a flat text-file list of keywords, download the SERP for each keyword, and then look for your site/domain. The SERPs are stored in MySQL for later reference, if need be!
The output is a .csv file - a comma delimited spreadsheet with the results.
--------------------
REQUIREMENTS:
--------------------
* A computer/server with PHP & MySQL installed (only been tested on OS X / Linux).
* Ability to use and execute shell / command line script.
* Patience for the script to get the results. (see "Important Notes" below)
--------------------
INSTALLATION:
--------------------
I'll try to make this as quick as possible (I don't lots of free time anymore to be typing long documents for these free tools).
1. Extract the Ranking-Reporter.zip file
2. Navigate into the resulting directory(-ies) (until you see a run-reports.php file).
3. Make sure a folder called "outputs" is also in that directory. If not, create.
4. Create an empty new MySQL database (I called mine "ranking_reports")
5. Execute the MySQL code in database.sql on the newly created database.
This will create a table called "serps".
6. Open run-reports.php in your favorite text editor and follow the instructions.
7. Open keywords.txt and put the keyword/phrases you want to track. One per line.
8. Using SSH/Telnet, navigate to the operating directory and run the run-reports.php by typing "php run-reports.php"
9. Watch the script do its thing.
10. Output reports will be placed in the "outputs" directory.
--------------------
IMPORTANT NOTES:
--------------------
I have put a huge 3 minute pause between hits. This is to prevent placing an excessive load on the search engines. I highly recommend you keep this pause to prevent all sorts of trouble (this is why patience is listed above as a requirement). A status report is provided between pauses - it's pretty cool, showing the time left on the pause, the total run time, the estimated time left and the number of keywords remaining.
Given that there is a huge pause between hits, I've made a compensation in that the serps list 100 results. HOWEVER, this has a significant drawback - Google / Yahoo will expand the number of listings shown for each domain when there are such a large number of results on the page, and this pushes results down some. So, your site may appear to be further down in the SERPs than when you check manually with a setting of 10 results per page. Nonetheless, this is a tradeoff that I've decided to accept. If you can't compromise on this, then act on the $serp_listings and $max_serps variables in the php file.
SERPs are stored in the database indefinitely. You MUST delete the entries manually before re-running the reporting tool, otherwise incorrect reports may be made from old data. I'll probably allow for versioning in the next version of this (if there is one), but for now - remember to make sure that the "serps" table in your database in empty before running the run-reports.php script... unless you know what you're doing and want to create an old report by turning $http_requests off.
Since the script is parsing the SERPs' HTML code, the reporting may no longer work if either engine chooses to reformat their HTML code. In such a case, you will either need to modify the php file yourself, or wait for another release.
This is just an adhoc solution to help some people out - so it's not polished, but you can email me for help and I'll do my best.
I look forward to hearing your feedback.
Darrin J. Ward