Page 1 of 1
How to end a session_start?
Posted: Thu Dec 09, 2004 11:01 am
by farid
Hi !!! I want to know if someone could help :
1. If there is a function to end a session in PHP? or How do I suppose to end session_start()?
2. Exists a function to obtain the IP adress of a user in PHP?
Thanks

[/php_man]
Re: How to end a session_start?
Posted: Thu Dec 09, 2004 12:37 pm
by Weirdan
farid wrote:
1. If there is a function to end a session in PHP? or How do I suppose to end session_start()?
It depends on what do you mean by 'ending a session'... [php_man]session_destroy[/php_man] destroys the session, [php_man]session_write_close[/php_man] flushes all changes made to session vars to disk and closes the session file.
farid wrote:
2. Exists a function to obtain the IP adress of a user in PHP?
$_SERVER['REMOTE_ADDR'] contains the IP address of the remote machine (either the IP address of the user, or IP of his/her proxy server).