Please wait while we load your page...

PasswordSentry

Latest Version [8.00202205221] Last Updated [May-22-2022]

Tools

PHP Manual [geoip_setup_custom_directory]

Protect Your Website Today


PHP Manual || GeoIP Functions

(PECL geoip >= 1.1.0)

geoip_setup_custom_directorySet a custom directory for the GeoIP database

Description

geoip_setup_custom_directory ( string $path ) : void

The geoip_setup_custom_directory() function will change the default directory of the GeoIP database. This is equivalent to changing geoip.custom_directory.

Parameters

path

The full path of where the GeoIP database is on disk.

Return Values

No value is returned.

Examples

Example #1 A geoip_setup_custom_directory() example

This will change the GeoIP default database path.

<?php

geoip_setup_custom_directory
('/some/other/path');

print 
geoip_db_filename(GEOIP_COUNTRY_EDITION);

?>

The above example will output:

/some/other/path/GeoIP.dat



PHP Manual || GeoIP Functions