PHP code example of insites / insites-sdk-php

1. Go to this page and download the library: Download insites/insites-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/ */

    

insites / insites-sdk-php example snippets


// The actual API key needs to be created at https://app.insites.com/en_GB/admin/settings#/api
$apiKey = "0123456789abcdef";
$insitesClient = \Insites\SDK\Client::createFromApiKey($apiKey);
$reportApi = $insitesClient->getReportApi();

$response = $reportApi->create()
    ->setUrl("https://example.insites.com")
    ->setAddress("Insites Technologies Ltd", "17", "Brunel Parkway", "Pride Park", "Derby", "DE24 8HR")
    ->setName("Insites")
    ->setPhone("01322 460460")
    ->execute();

echo "ReportId: " . $response->getReportId() . "\n";