Re: Using Perl to find what address bar says

On Nov 8, 1:53 am, jwcarlton <jwcarl...@xxxxxxxxx> wrote:
Can you guys think of a way, in Perl, to find what the address bar
actually says? I don't think that $ENV{'SCRIPT_NAME'} is quite the
same, because it's only going to show me what it's SUPPOSED to be.

I'm trying to find if a user is using something like or, and it seems like the easiest method is to compare
$ENV{'SCRIPT_NAME'} to the address bar. I can do it in Javascript, but
I'm hoping there's a way to do it in Perl.

In spite of the "genius" replies saying that this is impossible and
that I'm an idiot for asking, for future readers, there IS a way to
find if a user is using something like or
using Perl.

First, upload phpinfo.php (I know, that's PHP. Whatever. You can do it
in Perl if it suits your fancy):


Now, load this normally in your browser, then load it again using, or whatever other proxy you want.

Doing a side-by-side comparison, you'll see several discrepancies. The
most notable on my end is that didn't recognize Session
Handling; so, I can simply load a session variable on one page, then
test for that variable on the next page. If it doesn't exist, then
they're probably using a proxy.

It's not perfect, since browsers with cookies disabled probably
wouldn't recognize sessions, either. But since my site would be
virtually unusable without cookies, I'm not so concerned about that.

If that won't work for you, another discrepancy found was that on a
normal load, HTTP_CONNECTION is set to "Keep-Alive"; but, using
proxies, it's not set. So, a simple check for $ENV{HTTP_CONNECTION}
might be all that's needed.

There were several discrepancies, though, so using this method you can
pick and choose what's different on your server.

Please don't bother replying to this thread, as I don't intend to
return. My email address is here, though, so feel free to email



Relevant Pages

  • Re: Need ideas on how to make this code faster than a speeding turtle
    ... >> why are you calling out to a program when perl can load web pages just ... >> you have the text in $temp. ... you know how to use backticks but why do you ...
  • Re: Apples customer service sucks!
    ... have a load balancer distribute requests between them. ... break foo.php on server 2 until I've updated it as well. ... BBEdit. ... balancer supports session affinity or that you're storing all ...
  • DBI make test fails - trying to load old Storable
    ... Installing DBI-1.51 - 'make test' returns results that seem strange. ... tests that 'use Storable' attempt to load an old version installed under ... A newer version of Storable is installed under Perl 5.8. ... support iThreads ...
  • Re: Dynamically adding in User Controls
    ... This would allow me to load or not load depending on values in my session ... that the UserControl is part of the ... Control headerControl = Page.LoadControl; ...
  • Re: Hibernate LazyInitializationException in web application Struts as MVC, Spring as IOC and Hibern
    ... Instead, when you invoke a method of the collection for the first time, it executes an additional database query to load all the objects of the collection. ... In order for this query to work, the object must be associated to an open session. ... Since your toStringmethod probably invokes all the getters it finds on the value object and certainly invoke toStringon the result, Hibernate tries to load the objects in the collection, but your session is closed. ...