|
-
Aug 19th, 2002, 11:21 AM
#1
Thread Starter
Fanatic Member
checking binary data
im reading in binary data from the Inet control for movies.
sometimes it 404s however, and when i open the file in wordpad, the html 404 page is there. how do i check whether it 404d?
VB Code:
vtData = Inet1.GetChunk(256, 1)
tmplen = UBound(vtData)
length = length + tmplen 'get the total size
if instr(1,vtData,"404") then
....
i tried that, doesnt work, when i debug.print it, its full of ? marks.
any ideas? i think its a conversion from binary to ascii, which i dont know how to do..
thanks
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 19th, 2002, 11:33 AM
#2
Frenzied Member
I think you have a byte array, not a string...
Code:
z = ubound(vtdata)
limit - z -2
For i = 1 to limit ' we won't worry about a character 4 too near the end
if vtdata(i)=52 then ' a four
if vdata(i+1) = 48 and vtdata(i+2)= 48 then
msgbox "404 found"
exit for
end if
next
-
Aug 19th, 2002, 12:35 PM
#3
Thread Starter
Fanatic Member
ah okidoke, thanks.
but there isnt a faster way? like checking the first x number of bytes, instead of checking every 255 that comes in?
actually, ill work on it. thanks
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|