Title: WordPress and Geolocation
Last modified: August 18, 2016

---

# WordPress and Geolocation

 *  [max302](https://wordpress.org/support/users/max302/)
 * (@max302)
 * [20 years ago](https://wordpress.org/support/topic/wordpress-and-geolocation/)
 * I have a homemade script on my blog’s header to record visitors and there geographical
   position in a mysql database. I have however run into problems with the hostip.
   info api. What I want to do is IP lookup each new guest and store their location
   in a database. I try to run a file() on the location of the ip lookup page on
   hostip and I get the following error:
    Warning: file([http://api.hostip.info/get_html.php?ip=24.122.124.9](http://api.hostip.info/get_html.php?ip=24.122.124.9)):
   failed to open stream: No route to host in /home2/tales/public_html/wp-content/
   themes/default/header.php on line 63
 * So obviously, my geolocating function isn’t going anywhere. My homemade script
   can be found at [http://www.talesofanoob.er1.be/download/visitlog/visitlogger.txt](http://www.talesofanoob.er1.be/download/visitlog/visitlogger.txt)

The topic ‘WordPress and Geolocation’ is closed to new replies.

## Tags

 * [IP](https://wordpress.org/support/topic-tag/ip/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [max302](https://wordpress.org/support/users/max302/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/wordpress-and-geolocation/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
