ASP script to calculate search position

Discussion in 'C#' started by paul_delaney, May 13, 2008.

  1. #1
    paul_delaney, May 13, 2008 IP
  2. dgxshiny

    dgxshiny Greenhorn

    Messages:
    65
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    23
    #2
    To begin, I would try to get a successful scrape loaded into your application.

    <%
        Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
        objXmlHttp.open "GET", "http://www.google.com/", False
        objXmlHttp.send
    
            if objXmlHttp.status = 200 then
                ' Return header code must be equal to 200
                strHTML = objXmlHttp.responseText
                response.Write(Server.HTMLEncode(strHTML))
                else
                ' There is an erro
                response.Write("Error : " & objXmlHttp.statusText)
                end if
            Set objXmlHttp = Nothing
        %>
    Code (markup):
    From: http://www.dotnetindex.com/articles/3112_How_to_Grab_A_HTML_Page_Within_an_ASP.asp

    From there it is simply parsing for the tags he outlines in the article you linked to.
     
    dgxshiny, May 13, 2008 IP