php - HTTP POST with file attachment -


i trying receive orders supplier using http delivery. unsure being sent have set general capture see happening. here code:

<? $handle = fopen("landstore.txt", "w"); fwrite($handle, strtoupper($_server['request_method'])); $data = array("headers" => headers_list(), "post" => $_post, "get" => $_get, "file" => $_files); file_put_contents($handle, json_encode($data));  if (!empty($_post)) { fwrite($handle, date("y-m-d h:i:s")); fwrite($handle, "post on");  fwrite($handle, "\r\n"); foreach ($_post $key => $value)  {     fwrite($handle, $key." post =");     fwrite($handle, $value.",  ");         } fwrite($handle, "\r\n"); } if (!empty($_files))    { fwrite($handle, date("y-m-d h:i:s")); fwrite($handle, "files on"); fwrite($handle, "\r\n"); foreach ($_files $key => $value)  {     fwrite($handle, $key." file =");     fwrite($handle, $value.",  ");     } fwrite($handle, "\r\n"); }  if (isset($_get))   {    fwrite($handle, date("y-m-d h:i:s")); fwrite($handle, "get on"); fwrite($handle, "\r\n"); foreach ($_get $key => $value)  {     fwrite($handle, $key." =");     fwrite($handle, $value.",  "); } fwrite($handle, "\r\n"); }  fclose($handle); ?> 

the response this:

post2015-04-01 11:58:13get on outfilename =/exnfs/uat2/requests/001152/11525750/dispatch/simulated_output_n150324_001_31_r_hcp_60.pdf.xml,   

i asked supplier if link "/exnfs/uat2/..." should using retreive xml file, in whihc case need prefix. should ignore link there validation purposes , there should xml file attached post.

according response, request method post, there no entries being given $_post in foreach loop , path being returned $_get , there no $_files.

can me interpret response please. possible there file there somewhere path being sent post/get(? not sure which?) , how retreive file if exists. thanks.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -