Trouble getting POSTs

For programming and general questions on Zend Framework

Trouble getting POSTs

Postby properjon on Wed Dec 05, 2012 9:15 pm

What I want to do is set up a listener for a hook service that just sends a POST. I can send a mail with file_get_contents("php://input") in the body with no problem on a vanilla php script, but can't seem to get it to work at all within Zend Framework.

I have the POST going to urldotcom/controller/action

The code snippet is:
Code: Select all
if (!empty($_POST)) {
   $recipient = "me@somedomain";
   $forsubject = "Post Checker";
   $mailheader = "From: me@someotherdomain \r\nReply-To: me@someotherdomain \r\nX-Mailer: PHP/".phpversion();
   $formcontent =  file_get_contents("php://input");
   mail($recipient, $forsubject, $formcontent, $mailheader);

- Works in vanilla script outside ZF structure
- Doesn't work in controller or view.

My goal is to handle the data in the POST, but I after debugging a little while I found out it's just not being reached period.
Any help would be highly appreciated!
Posts: 1
Joined: Wed Dec 05, 2012 9:00 pm

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 3 guests