DTML or ZPT to show browser's IP?
Hello, Might someone be willing to point me in the right direction of how I might insert a simple tag to show the browser's IP address? Is this a simple global to be echoed or is more involved? Thanks, Michael.
On Thursday 11 March 2004 11:24 am, Michael Dexter wrote:
Might someone be willing to point me in the right direction of how I might insert a simple tag to show the browser's IP address? Is this a simple global to be echoed or is more involved?
Create a DTML method object called "test_request" with these contents: """ <dtml-var standard_html_header> <dtml-var REQUEST> <dtml-var standard_html_footer> """ You will find this a really educational experience. ;-D Doing so, I find that REMOTE_ADDR is probably what you want, although if you are running behind Apache as I am doing (and as I think is most common), it will be HTTP_X_FORWARDED_FOR. Could be more complicated if you are running a caching proxy server like Squid or something. But look at what the above script gives you on your server, and it should be pretty easy to figure out. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Michael, This can be fairly complex depending on how your servers are setup. Try creating a DTML method with the following: <dtml-var REQUEST> That should help you find which REQUEST varible will fit your needs. Troy
Hello,
Might someone be willing to point me in the right direction of how I might insert a simple tag to show the browser's IP address? Is this a simple global to be echoed or is more involved?
Thanks,
Michael.
As Terry Hancock mentioned, you will find several variables you can request individually. I think what you are actually asking for is <dtml-var REMOTE_ADDR> as you can do with any of those variables. Thomas
Hello,
Might someone be willing to point me in the right direction of how I might insert a simple tag to show the browser's IP address? Is this a simple global to be echoed or is more involved?
Thanks,
Michael.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
participants (4)
-
Michael Dexter -
Terry Hancock -
Thomas Bennett -
Troy Farrell