PHP code example of czdb / searcher

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

    

czdb / searcher example snippets



Czdb\DbSearcher;

$dbSearcher = new DbSearcher("/path/to/your/database.czdb", "BTREE", "YourEncryptionKey");

$ip = "8.8.8.8";
$region = $dbSearcher->search($ip);

echo "搜索结果:\n";
print_r($region);

$dbSearcher->close();