PHP code example of synchro / ptrify

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

    

synchro / ptrify example snippets


use Synchro\Ptrify\Ptrify;

$ptr = Ptrify::ptrify('192.0.2.151');
//$ptr == '151.2.0.192.in-addr.arpa'

$ptr6 = Ptrify::ptrify('2001:db8:f00::12:34ff:fe56:789a');
//$ptr6 == 'a.9.8.7.6.5.e.f.f.f.4.3.2.1.0.0.0.0.0.0.0.0.f.0.8.b.d.0.1.0.0.2.ip6.arpa'