PHP code example of opensrs / osrs-toolkit-php

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

    

opensrs / 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