SESS newSession

提供: GeeklogJpWiki

lib-session.php>SESS_newSession

目次

説明

 string SESS_newSession (int $userid, string $remote_ip, string $lifespan, [string $md5_based = 0]) 

Creates new user session (short term cookie) 新しくユーザーセッションを生成する(短期クッキー)

Adds a new session to the database for the given userid and returns a new session ID. Also deletes all expired sessions from the database, based on the given session lifespan.

所与のユーザーIDへのデータベースのに新セッションを追加し、新セッションIDを返す。同時に無効なセッションをデータベースから消去する。所与のセッション時間制限に基づいて消去は行われる。

パラメータ

$userid
User ID to create session for
$remote_ip
IP address user is connected from
$lifespan
How long (seconds) this cookie should persist
$md5_based
If 1 session will be MD5 hash of ip address

返り値

return: Session ID

参考

使用例

個人用ツール