$ENV{'URL'}

Discussion in 'Perl Misc' started by Todd Anderson, Feb 10, 2004.

  1. Hello,
    $ENV{'SERVER_NAME'} this indentifies a server name
    $ENV{'SCRIPT_NAME'} this indentifies a script name
    does anyone know what code would be used to indentify the url used to
    access a site?
    Thanks in advance for your help.
    Todd Anderson, Feb 10, 2004
    #1
    1. Advertising

  2. In article <>,
    Todd Anderson <> wrote:
    :$ENV{'SERVER_NAME'} this indentifies a server name
    :$ENV{'SCRIPT_NAME'} this indentifies a script name
    :does anyone know what code would be used to indentify the url used to
    :access a site?

    The appropriate environment variable is documented in any good CGI
    reference work. (e.g., w3c.org). Find the variable name and
    wrap it in $ENV{} .
    --
    Positrons can be described as electrons traveling backwards in time.
    Certainly many Usenet arguments about the past become clearer when they
    are re-interpreted as uncertainty about the future.
    -- Walter Roberson
    Walter Roberson, Feb 10, 2004
    #2
    1. Advertising

  3. Todd Anderson <> wrote:

    > $ENV{'SERVER_NAME'} this indentifies a server name
    > $ENV{'SCRIPT_NAME'} this indentifies a script name
    > does anyone know what code would be used to indentify the url used to
    > access a site?



    $ENV{'rectal discharge'}


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Feb 10, 2004
    #3
  4. Todd Anderson wrote:

    > Hello,
    > $ENV{'SERVER_NAME'} this indentifies a server name
    > $ENV{'SCRIPT_NAME'} this indentifies a script name
    > does anyone know what code would be used to indentify the url used to
    > access a site?
    > Thanks in advance for your help.


    HINT: Your question has nothing to do with Perl
    HINT: This group is not about web wevers


    But having said that, the following snippet of code will help you print out
    your environment variables. Use it inside cgi to see what your web server
    is sending.

    print "$_=$ENV{$_}" for sort keys(%ENV);


    gtoomey
    Gregory Toomey, Feb 10, 2004
    #4
  5. Todd Anderson

    Web Surfer Guest

    In article <>, says...
    > Hello,
    > $ENV{'SERVER_NAME'} this indentifies a server name
    > $ENV{'SCRIPT_NAME'} this indentifies a script name
    > does anyone know what code would be used to indentify the url used to
    > access a site?
    > Thanks in advance for your help.


    First, I believe that a group dedicated to writing CGI scripts, such as
    comp.infosystems.www.authoring.cgi , would be a better place for
    questions such as this.

    But I believe that the variable in question would be

    $ENV{'HTTP_REFERER'}
    Web Surfer, Feb 15, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Himmat Dhange
    Replies:
    0
    Views:
    427
    Himmat Dhange
    Aug 26, 2003
  2. Jon paugh
    Replies:
    1
    Views:
    703
  3. Ankit Mehta
    Replies:
    1
    Views:
    1,425
    Simon Brooke
    Sep 29, 2006
  4. Just D.
    Replies:
    0
    Views:
    416
    Just D.
    Aug 11, 2004
  5. TDR
    Replies:
    3
    Views:
    172
    Daniel Berger
    Aug 31, 2007
Loading...

Share This Page