Hi Ram, On Tue, 4 Oct 2011 11:34:16 +0530 Ramprasad Prasad <ramprasad...@gmail.com> wrote:
> In my cgi program .. I want to know if the user is accessing via HTTP or > HTTPS. > > How can I do this ? > A quick Google search yielded this link: http://stackoverflow.com/questions/5223341/how-do-i-identify-the-protocol-http-vs-https-using-perls-cgi-pm Here's a shorter link: http://stackoverflow.com/questions/5223341 Reading from there, one option would be: my $is_secure = $cgi->request_uri =~ m{^https://}; And a better one is: [QUOTE] CGI.pm has an https() method that, according to the documentation: operates on the HTTPS environment variables present when the SSL protocol is in effect. Can be used to determine whether SSL is turned on. This is probably what you're looking for. Without parameters, it returns a list of HTTPS environment variables. [/QUOTE] Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ What does "Zionism" mean? - http://shlom.in/def-zionism “I simply hate, detest, loathe, despise, and abhor redundancy.” — http://uncyclopedia.org/wiki/Redundancy Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/