From 965179508269f3ce40b188bd269c97c9c1adacec Mon Sep 17 00:00:00 2001 From: tianyu Date: Wed, 15 Jul 2015 09:16:10 +0800 Subject: [PATCH] Create README.md --- ip/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 ip/README.md diff --git a/ip/README.md b/ip/README.md new file mode 100644 index 0000000..7aaf189 --- /dev/null +++ b/ip/README.md @@ -0,0 +1,8 @@ +##Useage + +1\. In `index.php`, replace `$api_key = "YOUR_DB_IP_KEY(https://db-ip.com/api/)";` with your api key. + +2\. `GET` request e.g. `curl http://YOUR_DOMAIN_NAME` will return your current public ip address. + +3\. `POST` request e.g. `curl http://YOUR_DOMAIN_NAME -X POST -d "geo=IP_ADDRESS_YOU_ARE_QUERY"` will return ip geo info. +IP address located in china will use `17monip`, otherwise will use `DB-IP API`.