So the infinite recursion can only happen if the script that makes the HTTP request is actually calling itself (maybe on a different host)? Could you give each script and/or host some kind of unique identifier that it places in any request it makes (HTTP header, cookie, GET parameter, something), and if a script sees its own ID it stops the recursion? Or a more general solution, some kind of "Time To Live" HTTP header that gets decremented each time your script forwards a request?
In terms of determining the local machine's IP address(es), I've used IO::Interface::Simple a few times for that.
In reply to Re: How can I determine whether a URI, hostname or IP address is to the local host machine?
by Anonymous Monk
in thread How can I determine whether a URI, hostname or IP address is to the local host machine?
by dbooth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |