Splendid! The Hobopolis zones are a bit of a pain to check for -- a pain to our not-wanting-to-hit-the-server consciences. Glad that they're finally getting handled.
I had a bit of an idea -- using static variables, we can make a time-sensitive
visit_url() that will use a cached value until it expires. So, here's a CanAdv with a new function
timed_url(). It works like the single-parameter
visit_url(), except it allows you to specify the expiry time (in milliseconds). If that much time has passed since the page was last cached, it reloads. This allows us to specify the expiry time variably per function call. And using a static variable means that the cache will persist across script instances as well (necessary since I believe SeRa and Factroid both hit CanAdv via AJAX once per location rather than in a single script instance). This ought to significantly reduce server hits for checking Hobopolis zones.
While I was at it, I took out the old regex tongs and converted your excellent new hobocheck to use a regex, reducing the repeated code.
Several other changes are included as well, some of which are simply preference but some of which I believe to be actual fixes.