I have a few different domain names and i'm trying to build a small screen to check to see if each of the domains appear on googles homepage for a particular search phrase. I have tried this same technique with Yahoo and it works fine. When I try it with google I get this message:
Your client does not have permission to get URL /search?hl=en&q=flowers&bt
Search from this server. (Client IP address: xx.xxx.xx.xx)
Please see Google's Terms of Service posted at http://www.google.com/terms_of_service.html
I'm passing two variables into the search one is the text to look for on the page and the other is the search phrase.
Any ideas why I can not do this or how this, surely the http request is the same as me searching in my browser?
strInputURL = "http://www.google.com/search?hl=en&q="& request("search")&"&btnG=Google+Search"
websiteurl = request("findtext")
Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
objXMLHTTP.Open "GET", strInputURL, False
strPageText = objXMLHTTP.responseText
Set objXMLHTTP = Nothing
if instr(strPageText,websiteurl) then
response.Write("Website is on the first page!!<br>")
response.Write("Sorry your website is not on the first page :(<br><br>")