Web Analytics Made Easy -
StatCounter Returning HTTP_CLIENT_IP and HTTP_VIA in perl - CodingForum

Announcement

Collapse
No announcement yet.

Returning HTTP_CLIENT_IP and HTTP_VIA in perl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Returning HTTP_CLIENT_IP and HTTP_VIA in perl

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

    Any ideas...???
    \o/

  • #2
    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";
    Having said that, I've probably told you more than I know.

    Comment


    • #3
      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'}.
      Moderator, Perl/CGI Forum
      shadowstorm.net - subvert society

      Comment

      Working...
      X