[英]heartbleed affect the 3rd party php server receipt verify of itunes?
我有一个有效的 3rd 方 php 代码验证从 ipad 发送的收据。 但似乎https://sandbox.itunes.apple.com/verifyReceipt不再响应我的 php 代码。 如果我直接访问网址,甚至没有像{"status":21000}
这样的错误统计信息。 我在服务器端尝试了不同的方法,比如 curl_exec($ch); 或 file_get_contents 即使是简单的测试也根本没有返回任何内容。
$result = file_get_contents('https://sandbox.itunes.apple.com/verifyReceipt');
echo $result;
我想知道这是否是由心脏出血引起的,我该怎么办?
我原来的工作 php 代码:
if ($isSandbox) {
$endpoint = 'https://sandbox.itunes.apple.com/verifyReceipt';
}
else {
$endpoint = 'https://buy.itunes.apple.com/verifyReceipt';
}
// Connect to Apple server and validate.
$postData = json_encode(array("receipt-data" => $receipt));
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => $postData
),
);
$context = stream_context_create($options);
$result = file_get_contents($endpoint, false, $context);
好吧,经过几个小时的搜索和检查,我终于弄明白了,这是发生了什么:
我加了
error_reporting(E_ALL); ini_set('display_errors', '1');
到 php 文件得到的错误代码是file-get-contents Couldn't resolve host name
nameserver 8.8.8.8
但仍然无法正常工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.