Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Some handy variables!

This is a discussion on Some handy variables! within the PHP forums, part of the Programming Talk category; <? echo $_SERVER['REMOTE_ADDR']; ?> The above code produces the users IP. <? echo $_SERVER['HTTP_REFERER']; ?> That code tells you from ...

  1. #1
    Ricky is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    19

    Some handy variables!

    <?
    echo $_SERVER['REMOTE_ADDR'];
    ?>

    The above code produces the users IP.

    <?
    echo $_SERVER['HTTP_REFERER'];
    ?>

    That code tells you from where they come from

    <?php
    echo date("D M d, Y H:i:s");
    ?>

    Will give you the data as by Day Month Year Hour Minite Secs

    Y = Year eg. 2003
    y = Year eg. 03
    M = Month eg. Jan
    m = Month eg. 01
    D = Day eg. Fri
    d = Day eg. 03
    z = Day of the year eg. 002
    H = Hours in 24 hour format eg. 07
    h = Hours in 12 hour format eg. 7
    i = Minutes eg. 29
    s = Seconds eg. 28
    U = Seconds since epoch eg. 1041604168

    My name is Rick and I'm a Exforsysoholic! (Is that even a word lol)

  2. #2
    Adrian is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    Thanks for sharing... good post.


  3. #3
    Lucy is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    7
    how do you check for time zones with GMT....


  4. #4
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    Ricky good and interesting to know about handy variables presented in this discussion. Is there any other variables of this kind. If so kindly place this here so that we can get a full fledged knowledge in this context here in this discussion.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...