A remote server will redirect with posting a JSON string back to a URL in my Drupal site defined by hook_menu. But I don't know either care the URL of the remote server. How can I get the JSON data in my hook_menu? I use these codes:
$received = file_get_contents("drupal://input"); // Use inputstream module. $received = json_decode($received, TRUE); dpm($received);
When the redirection happened, the hook_menu page shows nothing. When I thereafter access the frontpage of my Drupal site, it shows as below:
Warning: file_get_contents(): Unable to find the wrapper "drupal" - did you forget to enable it when you configured PHP? in shisuepay_postback() (line 130 of /.../sites/all/modules/custom/shisuepay/shisuepay.module).
Warning: file_get_contents(drupal://input): failed to open stream: No such file or directory in shisuepay_postback() (line 130 of /.../sites/all/modules/custom/shisuepay/shisuepay.module).