PHP code example of skpassegna / ipregistry-php-sdk
1. Go to this page and download the library: Download skpassegna/ipregistry-php-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/ */
skpassegna / ipregistry-php-sdk example snippets
use Ipregistry\Sdk\IpRegistryClient;
use Ipregistry\Sdk\Config;
// Replace 'YOUR_API_KEY' with your actual Ipregistry API key.
$config = new Config('YOUR_API_KEY');
// (Optional) Customize base URL, timeout, hostname lookup, and output format:
// $config = new Config(
// 'YOUR_API_KEY',
// Ipregistry\Sdk\Constants::EU_BASE_URL, // Use EU base URL
// 10, // Set timeout to 10 seconds
// true, // Enable hostname lookup
// 'xml' // Set output format to XML
// );
$client = new IpRegistryClient($config);
$config = new Config(
'YOUR_API_KEY',
Ipregistry\Sdk\Constants::EU_BASE_URL, // Use EU base URL
10, // Set timeout to 10 seconds
true, // Enable hostname lookup
'xml' // Set output format to XML
);
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.