Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   An Interesting Puzzle... (http://www.velocityreviews.com/forums/t789326-an-interesting-puzzle.html)

surftown 08-10-2003 12:03 AM

An Interesting Puzzle...
 
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))
%>

dlbjr 08-10-2003 04:54 AM

Re: An Interesting Puzzle...
 
<%
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 08-10-2003 05:02 AM

Re: An Interesting Puzzle...
 
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" <dontknow@do.u> wrote in message
news:ORBK%23tuXDHA.2432@TK2MSFTNGP10.phx.gbl...
> <%
> 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
>
>





All times are GMT. The time now is 10:37 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57