[英]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.