PHP code example of guardian360 / quickscan-php-client

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

    

guardian360 / quickscan-php-client example snippets





tialize a new API client
$client = new Guardian360\Quickscan\Api\Client;

// URL to scan
$url = 'http://example.com';

// Example contact. These four fields are mandatory
$contact = [
    'company'   => 'Acme',
    'firstname' => 'John',
    'surname'   => 'Doe',
    'email'     => '[email protected]',
];

// Login so we receive a JWT token. Password will be encoded
$client->login('[email protected]', 'test');

// Always call the scan method before sending a report!
$scanResults = $client->scan($url);

// Send a report to the contact
$response = $client->sendReport($url, $contact);