For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Sort by

eBay Notifications Listener PHP sample - incomplete/cut-off Payloads problem with PHPinput stream capturing

  • Answer ID 2032
  • Published 09/12/2016 08:00 PM
  • Updated 09/12/2016 08:00 PM
  • Permalink
I am receiving cut off/incomplete Notification Payloads from eBay. I am using simple php script which send a 200OK response header and then captures the php input stream with file_get_contents(php://input ), which then is written to a log file.

We have found problems with capturing PHP input stream, and writing the payload to files. As mentioned in our code sample at:

Please use $GLOBALS["HTTP_RAW_POST_DATA"] to capture the payload instead of file_get_contents(php://input). We have problems like clients retrieving cut-off and incomplete payloads, when they capture the PHP input stream. (Note that eBay sent complete payloads to the clients, but the cut-off problem was at the client's end).

Also, Make sure that you acknowledge the request from eBay by sending proper response (headers) before capturing the payload. Depending on the size of the payload, the time taken to capture the payload might vary and in occasions of time consumed more than three secs, a time out happens.

Essentially the flow should be like:


headers("Status: 200 OK");

headers("Content-Type: text/html ");// this is optional as PHP send this header by default.


$file = 'notifications.log';
file_put_contents($file, $payLoad);


How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter