PHP Classes

File: php/getLocation.php

Recommend this page to a friend!
  Classes of bamigboye biodun   Logical Functions   php/getLocation.php   Download  
File: php/getLocation.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Logical Functions
General-purpose PHP and JavaScript functions
Author: By
Last change:
Date: 8 months ago
Size: 608 bytes


Class file image Download
function getUserLocation(string $ip = false): string
  if (
$ip === false) $ip = $_SERVER['REMOTE_ADDR'] ?? false;
  if (!
$ip) return 'ip_not_found';
unserialize(file_get_contents('' . $ip));

        @author : Biodun Bamigboye

        Credit :

      Location Currency, Conversion Rate, Region City
      , Map Co-ordinate, Time Zone , Continent, Country Code
      Note That this does not work on localhost.
      It has to be hosted on a server online