Script To Check Google Results

I have a mysql database containing data for a simple business directory.

Listed in the database for each and every business is their contact details and a unique page URL on my website.

I need to check Google once per day to see if those URLs are listed at #1 in google.com.au

Try with 3 different search phrases, as shown below.

1. business name suburb phone
2. business name suburb phone fast brilliant service
3. business name suburb phone totalwebsystem

If the URL is #1 in google for any of those searches, flag the record in the database. Save the query phrase to the database too, and its date.

——————————–

Finally, after checking all records, save all records that were found #1 today in a csv file.

send csv file to my email address, or send a link to download csv if size is large.

any records that are not #1, will be checked again in Google next time the script is run.

records that WERE found to be #1 today (in other words, they became #1 AFTER the last search was done), are flagged to NOT be searched in Google next time. So the script only checks those records that are NOT ALREADY found at #1.

———————————

I will add between 100,000 and 1,000,000 records per month, so you will need a way to handle Google blocking the script and using too much bandwidth, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *