PHP code example of embloy / embloy-php

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

    

embloy / embloy-php example snippets


use Embloy\EmbloyClient;
use Embloy\EmbloySession;

// Create an instance of EmbloySession
$session = new EmbloySession('mode', 'job_slug', ['success_url' => 'optional_success_url', 'cancel_url' => 'optional_cancel_url']);

// Create an instance of EmbloyClient
$client = new EmbloyClient('your-client-token', $session);

try {
    // Make a request to generate the URL
    $url = $client->makeRequest();
    echo "Application URL: $url";
} catch (\Exception $e) {
    echo "Error: " . $e->getMessage();
}
bash
composer