{"id":14966500,"url":"https://github.com/tim168/ip","last_synced_at":"2025-10-25T16:30:57.955Z","repository":{"id":57069757,"uuid":"250725513","full_name":"TIM168/Ip","owner":"TIM168","description":":earth_asia:根据IpV4、IpV6地址获取定位信息的PHP:elephant:组件  PHP components that obtain location information based on IpV4, IpV6 addresses","archived":false,"fork":false,"pushed_at":"2020-07-02T04:26:32.000Z","size":43,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-31T08:05:36.804Z","etag":null,"topics":["ip","ipv4","ipv4-address","ipv6","laravel","php","tp","yii"],"latest_commit_sha":null,"homepage":"https://github.com/TIM168/Ip","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TIM168.png","metadata":{"files":{"readme":"README-en.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-28T05:58:46.000Z","updated_at":"2024-02-01T04:33:12.000Z","dependencies_parsed_at":"2022-08-24T14:54:18.627Z","dependency_job_id":null,"html_url":"https://github.com/TIM168/Ip","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIM168%2FIp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIM168%2FIp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIM168%2FIp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TIM168%2FIp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TIM168","download_url":"https://codeload.github.com/TIM168/Ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238174139,"owners_count":19428631,"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":["ip","ipv4","ipv4-address","ipv6","laravel","php","tp","yii"],"created_at":"2024-09-24T13:36:29.403Z","updated_at":"2025-10-25T16:30:52.649Z","avatar_url":"https://github.com/TIM168.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Ip \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e A PHP component that gets location information based on IpV4 and IpV6 addresses\u003c/p\u003e\n\n[![Build Status](https://travis-ci.org/TIM168/Ip.svg?branch=master)](https://travis-ci.org/TIM168/Ip)\n[![Latest Stable Version](https://poser.pugx.org/tim168/ip/v/stable)](https://packagist.org/packages/tim168/ip)\n[![License](https://poser.pugx.org/tim168/ip/license)](https://packagist.org/packages/tim168/ip)\n[![Latest Unstable Version](https://poser.pugx.org/tim168/ip/v/unstable)](https://packagist.org/packages/tim168/ip)\n[![Total Downloads](https://poser.pugx.org/tim168/ip/downloads)](https://packagist.org/packages/tim168/ip)\n[![composer.lock](https://poser.pugx.org/tim168/ip/composerlock)](https://packagist.org/packages/tim168/ip)\n\nREADME: [中文](https://github.com/TIM168/Ip/blob/master/README.md \"中文\")/[English](https://github.com/TIM168/Ip/blob/master/README-en.md \"English\")\n\n## Install\n\n```shell\n$ composer require tim168/ip\n```\n\n## Use\n    require __DIR__ .'/vendor/autoload.php';\n\n    use Tim168\\Ip\\Ip;\n\t\n## Supported language formats\n|  character| describe  |\n| :------------ | :------------ |\n| en | english  |\n| de  | german  |\n| es  | spanish  |\n| pt-BR  | portuguese  |\n| fr  | french  |\n| ja | japanese  |\n| zh-CN  | chinese  |\n| ru  | russian  |\n## Get Ip location information\n    $res = Ip::getIp('json','116.234.222.36')\n\t\n## Example\n\t{\n        \"status\": \"success\",  \n        \"country\": \"China\",\n        \"countryCode\": \"CN\",\n        \"region\": \"SH\",\n        \"regionName\": \"Shanghai\",\n        \"city\": \"Shanghai\",\n        \"zip\": \"\",\n        \"lat\": 31.0449,\n        \"lon\": 121.4012,\n        \"timezone\": \"Asia/Shanghai\",\n        \"isp\": \"China Telecom (Group)\",\n        \"org\": \"Chinanet SH\",\n        \"as\": \"AS4812 China Telecom (Group)\",\n        \"query\": \"116.234.222.36\"\n    }\n## Get Xml Format\n    $res = Ip::getIp('xml','116.234.222.36')\n## Example\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n    \u003cquery\u003e\n    \t\u003cstatus\u003esuccess\u003c/status\u003e\n    \t\u003ccountry\u003eChina\u003c/country\u003e\n    \t\u003ccountryCode\u003eCN\u003c/countryCode\u003e\n    \t\u003cregion\u003eSH\u003c/region\u003e\n    \t\u003cregionName\u003eShanghai\u003c/regionName\u003e\n    \t\u003ccity\u003eShanghai\u003c/city\u003e\n    \t\u003czip\u003e\u003c/zip\u003e\n    \t\u003clat\u003e31.0449\u003c/lat\u003e\n    \t\u003clon\u003e121.4012\u003c/lon\u003e\n    \t\u003ctimezone\u003eAsia/Shanghai\u003c/timezone\u003e\n    \t\u003cisp\u003eChina Telecom (Group)\u003c/isp\u003e\n    \t\u003corg\u003eChinanet SH\u003c/org\u003e\n    \t\u003cas\u003eAS4812 China Telecom (Group)\u003c/as\u003e\n    \t\u003cquery\u003e116.234.222.36\u003c/query\u003e\n    \u003c/query\u003e\n## GET Csv Format\n    $res = Ip::getIp('csv','116.234.222.36')\n## Example\n\tsuccess,China,CN,SH,Shanghai,Shanghai,,31.0449,121.4012,Asia/Shanghai,China Telecom (Group),Chinanet SH,AS4812 China\n    Telecom (Group),116.234.222.36\n## Get Serialization Format\n    $res = $ip-\u003eget('php','116.234.222.36')\n## Example\n    a:14:{s:6:\"status\";s:7:\"success\";s:7:\"country\";s:5:\"China\";s:11:\"countryCode\";s:2:\"CN\";s:6:\"region\";s:2:\"SH\";s:10:\"regionName\";s:8:\"Shanghai\";s:4:\"city\";s:8:\"Shanghai\";s:3:\"zip\";s:0:\"\";s:3:\"lat\";d:31.0449;s:3:\"lon\";d:121.4012;s:8:\"timezone\";s:13:\"Asia/Shanghai\";s:3:\"isp\";s:21:\"China\n    Telecom (Group)\";s:3:\"org\";s:11:\"Chinanet SH\";s:2:\"as\";s:28:\"AS4812 China Telecom\n    (Group)\";s:5:\"query\";s:14:\"116.234.222.36\";}\n## IpV4 to IpV6\n\t$res = Ip::IpV4toV6('116.234.222.36')\n\t\n## Example\n\t0000:0000:0000:0000:0000:ffff:74ea:de24\n\n## IpV6 to IpV4\n\t$res = Ip::IpV6toV4('0000:0000:0000:0000:0000:ffff:74ea:de24')\n\t\n## Example\n\t116.234.222.36\n## License\n**MIT**\n\n## End\n#### Thank you for giving me a star\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftim168%2Fip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftim168%2Fip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftim168%2Fip/lists"}