PHP code example of virtuallast / surfsight-php-client
1. Go to this page and download the library: Download virtuallast/surfsight-php-client 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/ */
virtuallast / surfsight-php-client example snippets
use VirtualLast\Surfsight\Configuration;
use VirtualLast\Surfsight\Region;
use VirtualLast\Surfsight\SurfsightClient;
$client = SurfsightClient::create(
new Configuration(
region: Region::Europe,
email: $_ENV['SURFSIGHT_EMAIL'],
password: $_ENV['SURFSIGHT_PASSWORD'],
),
);
$device = $client->devices()->getDeviceByImei($imei);
echo $device->getData()->getName();