SEO Consultants: This post and tool has been updated please read the “update” section at the bottom.


You can download SERP2db by clicking the following button, don’t worry it is free you just need to Tweet this blog post to get the download link.

Today I wrote SERP2db, in short it is a PHP script which allows you to save search results in a MySQL database and retrieves Google +1 stats for top 10 or 100 results. It is very straight forward, you enter a keyword or a phrase and it will retrieve top 100 or top 10 results and will save it to a database. It creates the database itself as long as you add your username and password in the script.

How can you run the script?

You need to upload serp2db.php to a web server or you can test it locally using WAMP 2 or any other local server. You need to have cURL enabled otherwise the script will not work. Enabling cURL is pretty straight forward.

The steps are as follows (Steps for Microsoft Windows environment):

1) Close WAMP (if running)
2) Navigate to WAMPbinphp(your version of php)
3) edit php.ini
4) Search for curl, uncomment extension=php_curl.dll
5) Navigate to WAMPbinApache(your version of apache)bin
6) edit php.ini
7) Search for curl, uncomment extension=php_curl.dll
8) Save both
9) Restart WAMP (in some cases you might need to restart your machine)

Once cURL is enabled on your local host, you are set to go. Open serp2db.php and add your MySQL login details, on WAMP it the user is usually “root” and password is blank hence the following:

After adding your MySQL details you might want to change some other settings in the script i.e you might want to scan Google.com instead of Google.co.uk. You can change this in the following lines of code:

I will adding more features to this script. Bear in mind you are using your own IP address which means if you keep running this script extensively you might get banned by Google. Normally such script are run through a proxy pool to avoid captcha etc.

UPDATE:

SERP2db can now retrieve Google +1 stats for each query’s subsequent URLs. Basically, the tool will scan Google for top results for your query and will then retrieve the number of times each URL has been Google +1d. The Google +1 counter API was discovered by Tom Anthony over the weekend.

There are two files in the download archive, one saves search results in a MySQL database, the other one doesn’t use a database but retrieves Google +1 counts. Here is a screenshot of Google +1 counter version:

I have a demo but since I am not using a proxy pool I am unable to make it available on this website, however should you wish to try the demo please DM me @ysekand.

You can download SERP2db by clicking the following button, don’t worry it is free you just need to Tweet this blog post to get the download link (Remember, sharing is caring!).