Created
October 27, 2015 07:56
-
-
Save tkhoa2711/db5649307d04fe0f830f to your computer and use it in GitHub Desktop.
Get the location of an IP address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar api-query "http://api.netimpact.com/qv1.php?key=your-key&qt=geoip&d=json&q=") | |
(defun locate-ip (&optional ip) | |
(let ((url-request-method "GET")) | |
(url-retrieve (concat api-query ip) | |
(lambda (status) (switch-to-buffer (current-buffer)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment