-3

我用这段代码用苹果登录卷曲

 <?php
$url = "https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/directToSignIn?localang=en_US";
$post_data['theAccountName'] = "Email@email.com";
$post_data['theAccountPW'] = "mypassword";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$response = curl_exec($ch);

echo $response;
?>

但这对我没有任何建议

4

1 回答 1

0

请注意@Andrey 指出的服务条款。

但也许您必须将 HTTP 方法设置为 POST?

curl_setopt($ch, CURLOPT_POST, 1); 
于 2013-04-08T01:48:27.477 回答