PHP code example of detain / osrs-toolkit-php

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

    

detain / osrs-toolkit-php example snippets






try {
    $request = new Request();
    $response = $request->process('array', $data);

    // dump raw results
    var_dump($response->resultRaw);

} catch (\OpenSRS\Exception $e){
    // handle exception(s)
}



$data = array (
    "func" => "lookupLookupDomain",
    "data" => array (
        "domain" => "google.com",
    )
);

$osrsHandler = processOpenSRS ("array", $data);

var_dump($osrsHandler);

composer