Reading Raw Post Data in PHP

Perhaps you’d like to just sent XML over post, and not have xml=your_nodes_and_stuff_here. No sweat.

$xml = urldecode(file_get_contents('php://input'));

Enjoy.

This can now be called with:

curl -d "some_xml_here" http://yoursite.com/pagename

If you found this post helpful, please consider sharing to your network. I'm also available to help you be successful with your distributed systems! Please reach out if you're interested in working with me, and I'll be happy to schedule a free one-hour consultation.