PHP code example of silktide / prospect-php-client

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

    

silktide / prospect-php-client example snippets


// The actual API key needs to be created at https://app.prospect.silktide.com/en_GB/admin/settings#/api
$apiKey = "0123456789abcdef";
$prospectClient = \Silktide\ProspectClient\ProspectClient::createFromApiKey($apiKey);
$reportApi = $prospectClient->getReportApi();

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

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