Re: How to get the content of a 'custom' POST-Request

2007-05-15 Thread Marcus T. Jaschen
[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:

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread Chris Hartjes
On 5/14/07, Marcus [EMAIL PROTECTED] wrote: Hello guys, I'm trying to get the plain data from a POST (not a submitted form!) request. Think about such a request: POST /baz/post_test HTTP/1.1 Host: foobar.baz Content-Type: text/xml Content-Length: 666 abc def123/def /abc How can

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread Marcus
Yes, I want to parse it with SimpleXML. But to do this I need to access this data from within CakePHP - and this is my problem: I can't access the POST body (XML snippet) in my controller action ... (in this case we have a XML snippet in the POST request but it's also possible that we have plain

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread Chris Hartjes
On 5/14/07, Marcus [EMAIL PROTECTED] wrote: Yes, I want to parse it with SimpleXML. But to do this I need to access this data from within CakePHP - and this is my problem: I can't access the POST body (XML snippet) in my controller action ... I don't follow you here. You mean you can't

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread Marcus
On May 14, 8:39 pm, Chris Hartjes [EMAIL PROTECTED] wrote: Yes, I want to parse it with SimpleXML. But to do this I need to access this data from within CakePHP - and this is my problem: I can't access the POST body (XML snippet) in my controller action ... I don't follow you here. You

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread Chris Hartjes
On 5/14/07, Marcus [EMAIL PROTECTED] wrote: I don't follow you here. You mean you can't access the $_POST variable at all? The $_POST variable is empty if I try to dump it with debug() in my controller ... Okay, I'm even more confused now (but that's common these days). I'm assuming

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread Marcus
On May 14, 9:11 pm, Chris Hartjes [EMAIL PROTECTED] wrote: I don't follow you here. You mean you can't access the $_POST variable at all? The $_POST variable is empty if I try to dump it with debug() in my controller ... Okay, I'm even more confused now (but that's common these

Re: How to get the content of a 'custom' POST-Request

2007-05-14 Thread [EMAIL PROTECTED]
Perhaps you should try: $post_data = file_get_contents ('php://input'); That will tell you if your data is being posted correctly. On May 14, 4:11 pm, Marcus [EMAIL PROTECTED] wrote: On May 14, 9:11 pm, Chris Hartjes [EMAIL PROTECTED] wrote: I don't follow you here. You mean you can't