views:

119

answers:

2

Hello!

I've set up a filter at Gnip.com. In the field "POST URL" I've typed in my script URL. The URL is correct since Gnip.com really calls it. But when the script is called, I don't get any data. I've tried to parse $_GET and $_POST but both are empty arrays. getallheaders() gives me some data but no XML. How do I get the XML sent by Gnip.com?

I don't want to use any package since I only need to fetch the XML data which is sent to me by Gnip.com.

I hope you can help me. Thanks in advance!

Description of "POST URL" by Gnip.com: "POST URL: This is an optional URL that Gnip will POST updates to. The URL must be able to respond to a HEAD request. Example: http://pivotallabs.com "

A: 

Check out gnip-php instead of reinventing the wheel

jitter
I don't need all the methods included in gnip-php. So this package is a bit oversized for my purpose. I just need to fetch the XML Gnip.com sends to me.
+1  A: 

To get raw body of POST request, use:

$data = file_get_contents("php://input");
porneL
This is what I was looking for! :))) Thank you very much!