Results 1 to 2 of 2


  1. #1
    Join Date
    Dec 1969

    Default ASPHTTP

    Hello Guys,<BR><BR>I am trying to get a script to work, which will filter out the title, description and keywords from an site. A form is used to input the desired url, from which the component asphttp is to extract the title etc.<BR><BR>I&#039ve got a script which should do this but i cant get it to work! Could someone take a look and tell me why i do not get any output, except the url.<BR><BR>Many thanks<BR><BR>Here&#039s the code (only for the extraction of the title)<BR><BR>Set HttpObj = Server.CreateObject("AspHTTP.Conn")<BR>HttpObj.Url = Request("Url")<BR>HttpObj.FollowRedirects = True<BR>strResult = HttpObj.GetURL<BR><BR><BR> &#039 Title<BR> StartTitle = Instr(1, strResult, "&#060;title&#062;", 1)<BR> if starttitle &#060;&#062; 0 then<BR> EndTitle = Instr(StartTitle, strResult, "&#060;/title&#062;", 1)<BR> AantalTitle = EndTitle - StartTitle<BR> strTitle = Mid(strResult, StartTitle + 7, AantalTitle - 7)<BR> else strtitle = "No Title"<BR> end if<BR><BR> Response.Write "&#060;blockquote&#062;&#060;hr&#062;URL is now: " & StartTitle<BR> Response.Write "&#060;blockquote&#062;&#060;hr&#062;URL is now: " & HttpObj.URL<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Debugged?

    Have you tried debugging? Make sure all values are as they should be. If you&#039re submitting from a form, does it &#039POST&#039 or &#039GET&#039? it looks like httpObj.URL=request("Url") might need to be httpObj.URL=request.querystring("Url") or request.form("Url"). Debug it, does it throw errors? if so, then what are they? If not, then do response.writes in key places to find out if you have the values you think you should have.<BR><BR>Steve<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts