0

We have set up a URL in the app profile in iTunes and our server has cleared the ATS security criteria.

Following are the codes that we have tried to implement :

$data = json_decode(file_get_contents('php://input'), true);
$fp = fopen('appdata.txt', 'a');
fwrite($fp, $data);
fclose($fp);

We got no response with this code.

Then we tried -

$data = print_r($_REQUEST, TRUE);
$fp = fopen('appdata.txt', 'a');
fwrite($fp, $data);
fclose($fp);

We get a blank array in our 'appdata.txt' file as -

Array
(
)

Is there any way to find out if we are even receiving a response from Apple server?

phpidz
  • 39
  • 2
  • 9

1 Answers1

0

Finally, we have solved the issue :)

While checking error log file we find this error message -

PHP Warning: "fwrite() expects parameter 2 to be string, array given."

So we replaced this line in our first code -

fwrite($fp, $data);

with this -

fwrite($fp, print_r($data, true));

Now the code is working fine and we are getting the Status Update Notification every time.

phpidz
  • 39
  • 2
  • 9