Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there an eqivalent to php's $HTTP_RAW_POST_DATA in asp?

Status
Not open for further replies.

GreatSeaSpider

Programmer
Jul 14, 2003
70
GB
Hi there,

I need to create a file from the data posted to it. The data is actually a jpeg image!

I can use php's $HTTP_RAW_POST_DATA to get the data from the post, but i need this script in asp, could anybody tell me how to go about this in asp?

thanks,

Pete
 
hmm just read that and realised it doesnt make much sense!


>I need to create a file from the data posted >to it.

should read:

I need to create a file from the data posted to the script.

hope that makes more sense!
 
The HttpRequest class contains a ServerVariables collection (name/value pairs). Maybe what you want is in the "AllRaw" element? There you will find cookie data, info about the user-agent, etc. You could access this using
Code:
Request.ServerVariables["AllRaw"]

Most of the pieces are broken out into their own element, though, so if you just wanted cookie data, you could use
Code:
Request.ServerVariables["HTTP_COOKIE"]

BTW, are you just doing a standard file-upload? If so, there are simpler ways of accessing that data. There is a member of the HttpRequest class called "PostedFile", which gives you direct access to the file from your form.

HTH,
David
[pipe]

David
[pipe]
 
thanks david,

no unfortunately i'm not doing a standard file upload :)

the client isnt a browser, it's a piece of software which throws this image at my script! daft i know but i've got it working now, thanks!

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top