gobot (1) [Avatar] Offline
#1
Free IP lookup website Telize, http://www.telize.com, now says:
"The public API will permanently shut down on November 15th, 2015", and it did.

A code workaround is to substitute website Ip-Api.com
See docs at http://ip-api.com/docs/api:json.

1. Server code change from
  var apiUrl = 'http://www.telize.com/geoip/' + ip;

To
  var apiUrl = 'http://ip-api.com/json/' + ip;


2. HTML change from
  The IP address {{location.ip}}

To
  The IP address {{location.query}}


3. Suggested client code hardening. When I copied and pasted an IP, I hosed it with a leading space. I like to always trim form strings. From
  var ip = tpl.find('input#ipv4').value;

To
  var ip = tpl.find('input#ipv4').value.trim();

stephan.hochhaus (92) [Avatar] Offline
#2
Thanks for the feedback. Unfortunately we cannot change the book content, but if we do a second revision we'll make sure to find something longer lasting.
You can also do pull requests for the book code on GitHub and we can incorporate this, that way you also get credit (if you want smilie