简体   繁体   中英

PHP: Get body of request received

I am currently working with a 3rd party API which I cannot disclose. The summary is:

action -> 3rd party -> callback

So my server communicates with 3rd party with some data

Once the data is sent back, the 3rd party sends an XML to the callback url.

I am receiving the callback with the headers:

Content-type: application/xml Content-length: 69 Request-method: POST

However, print_r($_POST) is showing nothing at all. Nor is $_GET.

What could be going on? I know you cannot give me the most detailed answer based on my vagueness but if you could point me in the right direction, that would be brilliant.

使用php://输入

$post = file_get_contents('php://input');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM