Skip to content

Instantly share code, notes, and snippets.

@tkhoa2711
Created October 27, 2015 07:56
Show Gist options
  • Save tkhoa2711/db5649307d04fe0f830f to your computer and use it in GitHub Desktop.
Save tkhoa2711/db5649307d04fe0f830f to your computer and use it in GitHub Desktop.
Get the location of an IP address
(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