1
intel352
session id question
  • 2004/6/16 14:40

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


my website, http://www.csmapcentral.com, has run under *Nuke since it was started

the windows-based remote map installer that i created uses a modified nuke login script to authenticate a user before he/she is allowed to browse map downloads via the installer. i'm having to rewrite a few of the server-side php scripts for the move to xoops, and since i like to use a unique session in XOOPS so that logins are extended, i was wondering how a session operates? is it just stored in the database with a timestamp that gets updated with every user-visit to a XOOPS page?

if so, could i then just attach a xoops-generated session id to any urls referenced when a user access my site via the installer that i created? (i'm wondering if the session id just needs to be in the URL to work)


if anyone could explain this to me, i'd appreciate it. i'm used to programming in php, but i usually don't deal with cookies or sessions (and i know that the installer can't manage a cookie), so i'd like to use as much of the XOOPS natural process as possible (using sessions), and login/logout the user and track their activities/authentication by session


thanks for any help

2
intel352
Re: session id question
  • 2004/6/16 20:17

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


nudge

3
Dave_L
Re: session id question
  • 2004/6/17 0:49

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I haven't studied how XOOPS uses sessions (it looks like the code is in include/common.php), but I'm familiar with how PHP handles sessions and cookies.

The basic idea is that the session ID is passed around as either a cookie, a query string parameter or a form field, named "PHPSESSID". PHP automatically recognizes the session ID, regardless of which of those three places it's stored. The name "PHPSESSID" might be configurable; I don't remember.

As long as the session ID is available to the script, you can access session variables through the $_SESSION array (or $HTTP_SESSION_VARS for PHP versions earlier than 4.1).

Does that help?

4
intel352
Re: session id question
  • 2004/6/17 1:45

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


sure does, thanks dave

Login

Who's Online

843 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 843


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits