Jump to content

Display Post Data


walexman

Recommended Posts

I want to display the actual post request that the server has recieved. I've tried using echo "RAW_POST_DATA" but that seems to output nothing or ÿØÿà

 

I'm trying to format my own posts, and am having a lot of trouble, is there a way to do this with PHP? I want to experiment by seeing whats actually being recieved but I can't figure out how. I've read lots about formatting multipart/form-data POSTS but I haven't been able to have even the slightest success in figuring out how you actually write/send them.

Link to comment
Share on other sites

no, posts are apparently sent with a certain formatting which the server then interprets. I'm not trying to read the POST data, I know how to do that. I am trying to see the formatting of the actual post request that was sent. I'm trying to generate a post request that I can send to a client's CMS. For example, this is a post request generated by flash when uploading a file. What I would like to do is generate one of those of my own.

 

  POST /handler.cfm HTTP/1.1

  Accept: text/*

  Content-Type: multipart/form-data;

  boundary=----------Ij5ae0ae0KM7GI3KM7ei4cH2ei4gL6

  User-Agent: Shockwave Flash

  Host: www.example.com

  Content-Length: 421

  Connection: Keep-Alive

  Cache-Control: no-cache

 

  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7

  Content-Disposition: form-data; name="Filename"

 

  MyFile.jpg

  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7

  Content-Disposition: form-data; name="photo"; filename="MyFile.jpg"

  Content-Type: application/octet-stream

 

  FileDataHere

  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7

  Content-Disposition: form-data; name="Upload"

 

  Submit Query

  ------------Ij5GI3GI3ei4GI3ei4KM7GI3KM7KM7--

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.