walexman Posted February 5, 2008 Share Posted February 5, 2008 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. Quote Link to comment Share on other sites More sharing options...
Foser Posted February 5, 2008 Share Posted February 5, 2008 I'm a bit comfused in what you are trying to accomplish. If you want to echo out a form field you can use $_POST which is a global variable. $_POST['form_area_name']; Quote Link to comment Share on other sites More sharing options...
pdkv2 Posted February 5, 2008 Share Posted February 5, 2008 use <?php print_r($_POST); ?> Cheers ! Quote Link to comment Share on other sites More sharing options...
walexman Posted February 5, 2008 Author Share Posted February 5, 2008 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-- Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.