ip_country
From CashCrusaderWiki
(Difference between revisions)
(ip_country function) |
m (Information about ip_country constant) |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:ip_country}} | {{DISPLAYTITLE:ip_country}} | ||
| - | Use ''ip_country'' function to get country name for an IP address. | + | Use ''ip_country()'' function to get country name for an IP address. |
| + | |||
| + | |||
| + | To get country information for the current visitor/user, do not call ''ip_country($_SESSION['REMOTE_ADDR'])'', use ''ip_country'' constant instead as it already includes the country name. | ||
Current revision
Use ip_country() function to get country name for an IP address.
To get country information for the current visitor/user, do not call ip_country($_SESSION['REMOTE_ADDR']), use ip_country constant instead as it already includes the country name.
Required CashCrusader version: 3.0.0
Example usage:
<?php echo ip_country('8.8.8.8'); ?>
