Hi,
I'll try.
Code:
formdata=request.binaryread(formsize)
BinaryRead is used to read the raw data sent to the server by the client as part of a POST request.
formsize is the number of bytes to read.
formdata will contain the BinaryRead data. The data will be formsize long.
Code:
bncrlf=chrB(13) & chrB(10)
Setting a variable for carriage return & line feed. Normally used to mark the end-of-line.
Code:
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
divider will contain the left most data from formdata.
divider will only contain the data up to where the first bncrlf is found.
Code:
datastart=instrb(formdata,bncrlf & bncrlf)+4
datastart is the number of the position where 2 consecutive bncrlf's are found in formdata.
4 is added to get the number past the 2 consecutive bncrlf's.
Code:
dataend=instrb(datastart+1,formdata,divider)-datastart
dataend is the number where the binary string in divider is found within formdata but not from the beginning.
dataend starts at the number in datastart+1. Then the number of the position where divider is found. Then the number of datastart is subtracted.
dataend is actually setting the length for the next statement.
Code:
mydata=midb(formdata,datastart,dataend)
mydata will contain the data from formdata starting at datastart. It will be dataend long.

What the code appears to be doing is extracting certain portions of the raw data sent to a server by a client.

I hope this helps,
Al.