PHP code example of sidecloud / appleauto-php

1. Go to this page and download the library: Download sidecloud/appleauto-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sidecloud / appleauto-php example snippets


// 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;
}
bash
composer