note 13448 added to function.session-id.php
| From: | madsen at sjovedyr dot dk | Date: | Sun, 17 Jun 2001 10:57:30 +0000 |
| Subject: | note 13448 added to function.session-id.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14285@lists.php.net to get a copy of this message | ||
You actually can use $REMOTE_ADDR for session_id.
If you use:
<?
$ip = explode(".",$REMOTE_ADDR);
for($i=0;$i<4;$i++){
$ip[$i]=str_pad($ip[$i],3,"0",STR_PAD_LEFT);
}
$ip = implode("",$ip);
session_id($ip);
?>
Just a little something I just came up with, I haven't tested it yet...
~Madsen
http://www.php.net/manual/en/function.session-id.php