When hostip.info is down, OUR website crashes

General Discussion about IP Address Lookup caveats, technology, ideas, etc.

Moderator: Moderators

When hostip.info is down, OUR website crashes

Postby healingrooms on Mon Feb 09, 2009 2:30 pm

Recently, the hostip.info website had gone down (twice that I'm aware of over the past couple weeks).

All browsers except Google Chrome experienced the same problem as they do with JavaScript: The page which happened to be querying Hostip.info never fully loaded, and so the page didn't display.

It was after a full day with my web host's technical support that I traced the loading problem to the code which tried accessing the following line of code:

Code: Select all
$lines = @StripTags_IP(file('http://api.hostip.info/get_html.php?ip='.$IP));


When I disabled this API service, our website was functional again.

This does raise a concern that I have about accessing the Hostip.info API. I need to be constantly monitoring our own website to see if it starts loading slowly or not at all. Then I need to change the code, disabling the API which connects to Hostip.info. At least that's the "bandaid" approach.

Another solution would be to acquire the large database which Hostip.info uses, and put it on our own server.

+ The positive to that would be a sense of security, with our website never going down because another website went down.

- The negative would be that the data won't always be up to date. I am assuming that other users update incorrect IP addressesm like I do (which is inevitable... our own city suddenly became Denver, Colorado, USA when my ISP acquired more IP addresses). When that is corrected on hostip.info, it won't be automatically corrected in my own database.

One solution would be to make a list of updates since a certain date/time, so only certain rows of the database could be transferred to other websites.

A more definite approach would be to export the entire database every now and then, but I am certain that it would be wasting a lot of bandwidth, which hostip.info already appears to be concerned about.

Altogether the best approach would be to find a way to keep the hostip.info site from crashing, or at least returning some incomplete data, so the querying website won't go down as well. This way, the fewest changes could take place, and it could benefit small websites that don't have the same amount of available database space that I have.

I think the first approach, putting the entire database on our own server, is the solution I'll take for now. Any thoughts?
healingrooms
n00b
 
Posts: 3
Joined: Mon Feb 09, 2009 1:07 pm

Return to IP Address Lookup

Who is online

Users browsing this forum: No registered users and 4 guests

cron