Helpful Information
 
 
Category: Server side development
Returning HTTP_CLIENT_IP and HTTP_VIA in perl

I can do it in PHP but dunno how to in perl.

Any ideas...???

On the web page I pull a supposedly-JavaScript file which is actually a link to a Perl/CGI:

<script type="text/javascript" src="http://myscript.cgi"></script>

The CGI routine responds with valid JavaScript beginning with the header:

print "Content-type: text/javascript\n\n";

You can get the VIA with $ENV{'HTTP_VIA'}, though you may want to set it up with an IF to see if your host supports it at first, or if it is present in the current transaction.

Same thing with client_ip... $ENV{'HTTP_CLIENT_IP'}.










privacy (GDPR)