PHP Google Search Result script

I want to make a script which will do the below:

VisitGoogle.co.uk (pages from UK)

And enter a keyword

Ex: “web hosting”

Get all the search results from page 2-7 for example, or page 4-15, will vary.

Need to check for pages for each entry (both PPC and organic) that have pages beginning with contact/contact-us/contactus/cont or maybe us co.

The programme needs to grab the telephone number, all 01/02/07 and 08 numbers. Need to also grab page rank and meta keywords.

Then save in the database, along with domain.

Is there anyway to build a script like this in php? If so what are guides?

Many thanks