{"id":25600931,"url":"https://github.com/chrislim2888/ip2location-c-library","last_synced_at":"2025-04-10T01:06:43.688Z","repository":{"id":38454732,"uuid":"9740196","full_name":"chrislim2888/IP2Location-C-Library","owner":"chrislim2888","description":"IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.","archived":false,"fork":false,"pushed_at":"2025-03-18T05:07:46.000Z","size":8122,"stargazers_count":65,"open_issues_count":0,"forks_count":34,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-10T01:06:38.153Z","etag":null,"topics":["area-code","c","city","country","domain","elevation","geolocation","ip-address","ip-lookup","ip2location","iplocation","ipv4","ipv6","isp","mobile-info","region","timezone","weather-station","zip-code"],"latest_commit_sha":null,"homepage":"https://www.ip2location.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrislim2888.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-29T03:10:44.000Z","updated_at":"2025-03-29T12:39:02.000Z","dependencies_parsed_at":"2024-01-14T23:55:23.385Z","dependency_job_id":"92308f96-e7e2-449b-ba94-e889b4cb742c","html_url":"https://github.com/chrislim2888/IP2Location-C-Library","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-C-Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-C-Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-C-Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-C-Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrislim2888","download_url":"https://codeload.github.com/chrislim2888/IP2Location-C-Library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137887,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["area-code","c","city","country","domain","elevation","geolocation","ip-address","ip-lookup","ip2location","iplocation","ipv4","ipv6","isp","mobile-info","region","timezone","weather-station","zip-code"],"created_at":"2025-02-21T15:37:09.667Z","updated_at":"2025-04-10T01:06:43.660Z","avatar_url":"https://github.com/chrislim2888.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP2Location C Library\n\nIP2Location is a C library that enables the user to find the country, region or state, district, city, latitude and longitude,  ZIP/Postal code, time zone, Internet Service Provider (ISP) or company  name, domain name, net speed, area code, weather station code, weather  station name, mobile country code (MCC), mobile network code (MNC) and  carrier brand, elevation, usage type, address type, IAB category and ASN by IP address or hostname originates from. The library reads the geo location information\nfrom **IP2Location BIN data** file.\n\nIn addition to the C Library, the build process will also create an executable called \"**ip2location**\" that allows you to directly perform IP geolocation lookups. Please refer to the ip2location CLI documentation for more information.\nSupported IPv4 and IPv6 address.\n\nFor more details, please visit:\n[https://www.ip2location.com/developers/c](https://www.ip2location.com/developers/c)\n\n# Installation\n###  Unix/Linux\n    autoreconf -i -v --force\n    ./configure\n    make\n    make install\n    cd data\n    perl ip-country.pl\n\n\n\n### Debian\n\n```\ncurl -LO https://github.com/chrislim2888/IP2Location-C-Library/releases/download/8.6.1/ip2location-8.6.1.deb\nsudo dpkg -i ip2location-8.6.1.deb\n```\n\n\n\n### Ubuntu\n\n```\nsudo add-apt-repository ppa:ip2location/ip2location\nsudo apt update\nsudo apt install ip2location\n```\n\n\n\n### Windows\n\n    Execute \"vcvarsall.bat\". (This file is part of Microsoft Visual C, not ip2location code) \n    nmake -f Makefile.win\n    cd data\n    perl ip-country.pl\n\n### MacOS\n    autoreconf -i -v --force\n    export CFLAGS=-I/usr/include/malloc \n    ./configure\n    make\n    make install\n    cd data\n    perl ip-country.pl\n\n# Testing\n    cd test\n    test-IP2Location\n\n# Sample BIN Databases\n* Download free IP2Location LITE databases at [https://lite.ip2location.com](https://lite.ip2location.com)  \n* Download IP2Location sample databases at [https://www.ip2location.com/developers](https://www.ip2location.com/developers)\n\n# IPv4 BIN vs IPv6 BIN\n* Use the IPv4 BIN file if you just need to query IPv4 addresses.\n* Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.\n\n# NOTES\nIf you encountered **error while loading shared libraries** in linux platform, that could be due to the shared library was saved into **usr/local/lib** that might not be the default library path. You can run the below command\n```\nldconfig /usr/local/lib\n```\n\n# IP2Location CLI\nQuery an IP address and display the result\n\n```\nip2location -d [IP2LOCATION BIN DATA PATH] --ip [IP ADDRESS]\n```\n\nQuery all IP addresses from an input file and display the result\n```\nip2location -d [IP2LOCATION BIN DATA PATH] -i [INPUT FILE PATH]\n```\n\nQuery all IP addresses from an input file and display the result in XML format\n```\nip2location -d [IP2LOCATION BIN DATA PATH] -i [INPUT FILE PATH] --format XML\n```\n\n\n# References\n\n##### Address Type\n\nAddress type is the IP address types as defined in Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). The database return a single character. For the full description, please refer to list below:\n\n- (A) Anycast - One to the closest\n- (U) Unicast - One to one\n- (M) Multicast - One to multiple\n- (B) Broadcast - One to all\n\n\n\n##### Category\n\nCategory is the domain category is based on [IAB Tech Lab Content Taxonomy](https://www.ip2location.com/free/iab-categories). These categories are comprised of Tier-1 and Tier-2 (if available) level categories widely used in services like advertising, Internet security  and filtering appliances. Please refer to https://www.ip2location.com/free/iab-categories for the full list.\n\n\n\n# Packages for Fedora/Enterprise Linux can be found here\n\n* https://koji.fedoraproject.org/koji/packageinfo?packageID=32132\n* https://src.fedoraproject.org/rpms/IP2Location\n* https://bodhi.fedoraproject.org/updates/?packages=IP2Location\n\n# Support\nEmail: support@ip2location.com.  \nURL: [https://www.ip2location.com](https://www.ip2location.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrislim2888%2Fip2location-c-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrislim2888%2Fip2location-c-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrislim2888%2Fip2location-c-library/lists"}