I made a script like that a few years back.. But it only checks the first 100 google results for the site.. It could easily be made to check several pages. Check out the file handling functions and the regex functions of PHP - it is a pretty simple script

The only thing about it is that different google datacenters will return different results, so you either have to check all of them or choose which one is the most important to you.