PHP库

这是一个帮助您管理共享 Apple 账户的项目。

通过这个库,您可以轻松实现AppleAuto API提供的几个功能。

安装

该库可以通过Composer安装。运行以下命令:

composer require sidecloud/appleauto-php

用法

分享页面

这可以让您从AppleAuto的共享页面获取账户。

如果您的分享链接是https://test.com/share/kfcv50,则将“share”替换为“shareapi”。

如果你的分享页面需要密码,那么请将其添加为第二个参数。例如https://test.com/shareapi/kfcv50/password

// Create a new SharePage object
$page = new AppleAutoShare\SharePage("https://test.com/shareapi/kfcv50");

// The request will be sent when the object is created, so you can get the accounts directly
$accounts = $page->accounts;
echo "username".$accounts[0]['username'];
echo "password".$accounts[0]['password'];
echo "last_check".$accounts[0]['last_check']; // The date and time in string format
echo "status".$accounts[0]['status']?"Normal":"Abnormal"; // status is a boolean value

// The error message will be stored in $page->errorMsg, if there is.
// By default, it is null.
if ($page->errorMsg) {
    echo $page->errorMsg;
}

最后更新于