PHP code example of statuspage / statuspage-sdk-php
1. Go to this page and download the library: Download statuspage/statuspage-sdk-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/ */
statuspage / statuspage-sdk-php example snippets
php
<php
use Guzzle\Http\Client as GuzzleClient;
use StatusPage\SDK\Client;
$client = new Client(new GuzzleClient, 'YOUR_PAGE_ID', 'YOUR_SECRET_KEY');
$client->metrics()->submitData('YOUR_METRIC_ID', time(), mt_rand(1, 100));