How to end a session_start?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
farid
Forum Commoner
Posts: 54
Joined: Thu Nov 11, 2004 4:20 pm
Location: Mexico

How to end a session_start?

Post by farid »

:oops: :cry:

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
:lol:[/php_man]
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: How to end a session_start?

Post 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).
Post Reply