
- Forum
- Programming Talk
- PHP
- Some handy variables!
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 ...
-
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)
-
Thanks for sharing... good post.
-
how do you check for time zones with GMT....
-
12-07-2006, 01:14 AM #4
- 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
«
Date and time script in PHP
|
How many ways we can retrieve the date in result set of mysql using php
»

Reply With Quote





