PHP code example of pathlyhq / sdk

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

    

pathlyhq / sdk example snippets



use Pathly\Client;
use Pathly\ScenarioInput;

$client = new Client(); // reads PATHLY_API_TOKEN
$scenario = $client->createScenario(new ScenarioInput(
    name: 'Checkout',
    url: 'https://shop.example.com/cart',
    intervalSec: 300,
    expectText: 'Your cart',
    tags: ['prod', 'payment'],
));
echo $scenario->id, PHP_EOL;