Hey, I have a site that needs to check whether URLs submitted by users are listed in Google. My question to you fine folk is, how can I achieve this using PHP, preferably as simply as possible? i.e. User submits URL through form Script runs a query against Google to check that URL exists in Google's listings and then returns true or false. I'm basically looking to identify whether URLs submitted are banned from Google's index. Thanks in Advance!
You will need to use file_get_contents or curl to download the searcch page from google, then use regular expressions to parse the page.
Thanks for the help guys... Checking Google, I guess the easiest way of doing it is to search for the "did not match any documents" string after querying site:www.domain.com Cheers!
Please make sure that you sign up for google API if you have a lot of queries or else u will get banned.
HI, I'm doing the same thing today. I found this spider tutorial I am a little concerned with getting banned though as I'm dabbling a little above my head here. I am spidering a google search result: http://www.google.ie/search?hl=en&q=http%3A%2F%2Fwww.example.com%2F&btnG=Google+Search&meta= HTML: I have included the <script src="http://www.google.com/jsapi?key= HTML: with my google API key, because someone above mentioned it. Will this be enough to prevent me being banned or do I have to some how use the google API to interface to do my queries.