An Interesting Puzzle...

Discussion in 'ASP General' started by surftown, Aug 10, 2003.

  1. surftown

    surftown Guest

    Check out http://www.theindianmaiden.com/lost/ripper.asp

    I am sure that it is an easy problem but can anybody tell me why I
    cant get rid/detect these question marks?

    <%
    url = "http://www.employnow.com/castingc.htm"


    set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
    xmlhttp.open "GET", url, false
    xmlhttp.send ""
    oText = xmlhttp.responseText
    set xmlhttp = nothing


    oText = lcase(mid(oText,instr(oText,"<body")+5))

    for i = 0 to 96

    do while instr(oText,chr(i)) <> 0

    oText = left(oText,instr(oText,chr(i))-1) +
    mid(oText,instr(oText,chr(i))+1)

    loop

    next

    response.write("is there any ? left? "+cstr(instr(otext,chr(63)))+"
    then what is this: "+mid(otext,1935,1))
    %>
     
    surftown, Aug 10, 2003
    #1
    1. Advertising

  2. surftown

    dlbjr Guest

    <%
    url = "http://www.employnow.com/castingc.htm"
    set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
    xmlhttp.open "GET", url, false
    xmlhttp.send ""
    oText = xmlhttp.responseText
    set xmlhttp = nothing
    oText = lcase(mid(oText,instr(oText,"<body")+5))

    intLength = Len(oText)
    If intLength > 0 Then
    Dim arrayData()
    ReDim arrayData(intLength)
    intCount = 0
    For i = 1 To intLength
    strItem = Mid(oText,i,1)
    intItem = Asc(strItem)
    If intItem >= 97 And intItem <= 122 Or intItem = 32 Then
    arrayData(intCount) = strItem
    intCount = intCount + 1
    End If
    Next
    End If
    oText = Join(arrayData)
    response.write("is there any ? left? " + cstr(instr(otext,chr(63))) +
    "<BR>then what is this: " + mid(otext,1935,1))
    %>

    -dlbjr

    invariable unerring alien
     
    dlbjr, Aug 10, 2003
    #2
    1. Advertising

  3. surftown

    surftown Guest

    This produces the same output. Is there anything in my code that could
    produce an INSTR not detecting a ? but printing the ? on the very next
    statement?

    "dlbjr" <> wrote in message
    news:ORBK%...
    > <%
    > url = "http://www.employnow.com/castingc.htm"
    > set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
    > xmlhttp.open "GET", url, false
    > xmlhttp.send ""
    > oText = xmlhttp.responseText
    > set xmlhttp = nothing
    > oText = lcase(mid(oText,instr(oText,"<body")+5))
    >
    > intLength = Len(oText)
    > If intLength > 0 Then
    > Dim arrayData()
    > ReDim arrayData(intLength)
    > intCount = 0
    > For i = 1 To intLength
    > strItem = Mid(oText,i,1)
    > intItem = Asc(strItem)
    > If intItem >= 97 And intItem <= 122 Or intItem = 32 Then
    > arrayData(intCount) = strItem
    > intCount = intCount + 1
    > End If
    > Next
    > End If
    > oText = Join(arrayData)
    > response.write("is there any ? left? " + cstr(instr(otext,chr(63))) +
    > "<BR>then what is this: " + mid(otext,1935,1))
    > %>
    >
    > -dlbjr
    >
    > invariable unerring alien
    >
    >
     
    surftown, Aug 10, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob
    Replies:
    3
    Views:
    6,658
    Nedu N
    Aug 6, 2003
  2. dwa

    Design Puzzle!

    dwa, Jun 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    Cowboy \(Gregory A. Beamer\) [MVP]
    Jun 10, 2004
  3. Shankara Narayanan

    Booking puzzle....

    Shankara Narayanan, Jun 17, 2004, in forum: ASP .Net
    Replies:
    20
    Views:
    938
    bredal Jensen
    Jun 30, 2004
  4. VB Programmer
    Replies:
    2
    Views:
    432
    Alan Lambert
    Nov 4, 2004
  5. Renu
    Replies:
    11
    Views:
    489
    Neil Cerutti
    Sep 7, 2007
Loading...

Share This Page