#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    1
    Rep Power
    0

    Search thread in rank search


    Hi, I'm currently trying to resurrect an old script that was used to search the search engines to find the rank of a keyword. It used to work well until Google changed something. This is the part of the file that is the search string:

    searchUrl = "http://www.google.com/search?" & strQuery & "&num=100"

    and this is the function:
    Code:
    function googlecom(url, kwa, kwb, kwc) dim objXmlHttp, strHTML, strQuery, loc, pos, tmpURL, found, tmpLoc, searchURL strQuery = Server.URLEncode(Trim(kwa)) if kwb <> "" then strQuery = strQuery & "+" & Server.URLEncode(Trim(kwb)) if kwc <> "" then strQuery = strQuery & "+" & Server.URLEncode(Trim(kwc)) strQuery = replace(strQuery,"%A0","%20") 'searchUrl = "http://" & findmyrankport & "/engineme.asp?engine=googlecom&q=" & strQuery 'searchUrl = "http://www.google.co.uk/search?hl=en&ie=UTF-8&oe=UTF-8&q=" & strQuery & "&btnG=Google+Search&meta=cr%3DcountryUK%7CcountryGB" searchUrl = "http://www.google.com/search?" & strQuery & "&num=100" ' This engine cannot deal with searching for www.neomancerco.uk/stuffs and things set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") objXmlHttp.setTimeouts 30000, 30000, 30000, 30000 objXmlHttp.open "GET", searchUrl, False objXmlHttp.SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)" objXmlHttp.send strHTML = objXmlHttp.responseText set objXmlHttp = Nothing
  2. #2
  3. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    Please edit your posted code to include line breaks, it's basically unreadable as-is. Copy & paste from notepad is one way to do this, where copy & paste from an html page often only has html breaks, which a textarea doesn't understand.
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

IMN logo majestic logo threadwatch logo seochat tools logo