Skip to content
This repository was archived by the owner on Apr 9, 2023. It is now read-only.
beranek1Public archive

About

Retrieves the geolocation of IP addresses using RDAP and hostnames.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoIP

PHP Library for retrieving the geolocation of ip addresses.

Usage

All you need to do is including "geoip.php":

include  "geoip.php";

GeoIP consists of 4 functions:

  • get_country_by_host($host)
  • get_country_by_ip($ip)
  • get_country_by_rdap($query)
  • get_continent_by_country($country)

What they do is already obvious by their name, the return value is either a two character country/continent code or null if the location is unknown.

"get_country_by_rdap($query)" uses the RDAP protocol for getting the ip address' location, works for all european ones.

Affiliated projects

About

Retrieves the geolocation of IP addresses using RDAP and hostnames.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages