Hi,
How to get the User host, Operating System User host name using PHP.
And how to give unique session id for each login of user.
Thanks
How to get host name, Operating system User.....
Moderator: General Moderators
The majority of this question can be answered by the $_SERVER variable;
Code: Select all
echo '<HR><PRE>'; print_r($_SERVER); echo '</PRE>';http://uk2.php.net/manual/en/reserved.v ... les.server explains the $_SERVER superglobal, where you can find user info.
As far as i'm aware, a unique session id is autmatically generated for you, accessed through the 'SID' constant.
As far as i'm aware, a unique session id is autmatically generated for you, accessed through the 'SID' constant.
Code: Select all
// Host name. This might need setting up though, the details are in the link i gave you.
$_SERVER['REMOTE_HOST'];
// IP address of client.
$_SERVER['REMOTE_ADDR'];
//Or...
$hostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);