How can i retrive the IP address of a user connected to database without using form?
Please, help me.
Thanks
IP address
Moderator: General Moderators
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
Code: Select all
$_SERVERї'REMOTE_ADDR']I use this in alot of things. Sometimes to put in a DB and sometimes just a text file. Other times I echo it to the screen.
Code: Select all
<?php
$lastip=($REMOTE_ADDR);
?>You would use the date function.
http://www.php.net/manual/en/function.date.php
Example:
Now for the moment I put this up it would be
Sunday December 22, 2002 10:03 AM PST
If you can not remember all the options just remember the function and then go to php.net or have them written down.
Jerry
http://www.php.net/manual/en/function.date.php
Example:
Code: Select all
<?php
$time=date("l F d, Y h:i A T");
echo $time;
?>Sunday December 22, 2002 10:03 AM PST
If you can not remember all the options just remember the function and then go to php.net or have them written down.
Jerry