[EMAIL PROTECTED] wrote:
> Perhaps you should try:
> $post_data = file_get_contents ('php://input');
> 
> That will tell you if your data is being posted correctly.

Ok, I tried that and ... it shows me the POST-Data as one would expect
it. My POST-Request:

POST /games/send_data HTTP/1.1
Host: tk.loc
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.3)
Gecko/20070309 Firefox/2.0.0.3
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie:
tkAuth=%BD%1C%BDl%BB%C4%FE%A8e%8D%1D%86%0F%C4%7E%0C%82%D4%D7%A5%8FE%C2%8F+%8E%E5%F2Y%3B%87%9B+zK%FF%034%5E%09Z%5B%F7%23%92S%D7%B5%AC%9D%16t%C8K%1F%0E%D3h%D9%3A%B4%91%08%0B%3C%93DquS%80%0D%CD%8C%A5%A7%AC%C6%80%FC%FF%81B%E9%A0%E38%99%DCs%A2%CC%D7%5D%A4%D5;
tkSession=332e7a6effc76b9bac3c0ed985e0bde5
Referer: http://tk.loc/swf/games/urlRequest.swf
Content-type: text/xml
Content-length: 80

<gameinfo>
  <game>
    <id>1</id>
    <score>2000</score>
  </game>
</gameinfo>

When I dump the $_POST variable I get an empty Array:

<pre class="cake_debug">
Array
(
)
</pre>

When I dump the data with php://input I get the assumed data:

<pre class="cake_debug">
<gameinfo>
  <game>
    <id>1</id>
    <score>2000</score>
  </game>
</gameinfo>
</pre>

After reading the PHP manual I think I'll use the php://input stream for
working with my POST data - it seems to be a good choice. $_POST seems
to hold only POST variables but not POST raw data - it seems that this
is the reason why I cannot access my XML snippet within the $_POST
variable ...

Chris and the unknown Gmane-Poster - thanks for your help :)

Marcus


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to