PHP code example of actinity / signed-urls

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

    

actinity / signed-urls example snippets


    'source_name' => 'reports',
    'public_keys' => [
        'dashboard' => <DASHBOARD_PUBLIC_KEY_HERE>
    ]

$service = app(\Actinity\SignedUrls\SignedUrlService::class);
$url = $service->sign('https://www.example.com');

$service = app(\Actinity\SignedUrls\SignedUrlService::class);
try {
    $service->validate($request->fullUrl());
} catch(\Actinity\SignedUrls\Exceptions\InvalidSignedUrl $exception) {
    dd($exception->errors());
}