Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-11-2006, 02:46 PM Cross-site Sessions
fambi's Avatar
Ultra Talker

Posts: 339
Trades: 0
Hi all,

We currently have a lot of information which are held in the $_SESSION.

Is there any way to carry this information to another site which we own?
__________________

Please login or register to view this content. Registration is FREE
from a
Please login or register to view this content. Registration is FREE
is easy!
Read this
Please login or register to view this content. Registration is FREE
that uses our
Please login or register to view this content. Registration is FREE
.
fambi is offline
Reply With Quote
View Public Profile Visit fambi's homepage!
 
 
Register now for full access!
Old 07-11-2006, 03:10 PM Re: Cross-site Sessions
Spiros's Avatar
Experienced Talker

Posts: 40
Name: Spyros
Location: Athens, Hellas
Trades: 0
Nope. When the user leaves your site all the session data are destroyed.

But you can still save what you want in cookies, and then on the other site make a new session with the retrieved info.

Last edited by Spiros; 07-11-2006 at 03:11 PM..
Spiros is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 10:46 PM Re: Cross-site Sessions
fambi's Avatar
Ultra Talker

Posts: 339
Trades: 0
Thanks for the answer (although i might add that the session seems to destroy when the browser is closed - as opposed to leave the site).

Anyhow, you answered the question. Thanks.
__________________

Please login or register to view this content. Registration is FREE
from a
Please login or register to view this content. Registration is FREE
is easy!
Read this
Please login or register to view this content. Registration is FREE
that uses our
Please login or register to view this content. Registration is FREE
.
fambi is offline
Reply With Quote
View Public Profile Visit fambi's homepage!
 
Old 07-11-2006, 10:53 PM Re: Cross-site Sessions
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Session data won't be distroyed if they are stored on server side. You can continue to carry a session from site to site if the two sites are hosted on the same server. If you can't define the session storing path from both sites to the same location, you could store session data in a db instead.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 10:56 PM Re: Cross-site Sessions
fambi's Avatar
Ultra Talker

Posts: 339
Trades: 0
Thanks MG,

The two sites ARE hosted on the same server, so how do i "define the session storing path from both sites to the same location".

Thanks again.
__________________

Please login or register to view this content. Registration is FREE
from a
Please login or register to view this content. Registration is FREE
is easy!
Read this
Please login or register to view this content. Registration is FREE
that uses our
Please login or register to view this content. Registration is FREE
.
fambi is offline
Reply With Quote
View Public Profile Visit fambi's homepage!
 
Old 07-11-2006, 11:07 PM Re: Cross-site Sessions
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
PHP Code:
// From php of site #1
session_save_path('/home/site1/public_html/sessions/');
 
// From php of site #2
session_save_path('/home/site1/public_html/sessions/'); 
The sessions will still need to go by the same session name for this to work, and remember to set the correct permissions on the path dir.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 11:58 PM Re: Cross-site Sessions
fambi's Avatar
Ultra Talker

Posts: 339
Trades: 0
Excellent. Thanks.
__________________

Please login or register to view this content. Registration is FREE
from a
Please login or register to view this content. Registration is FREE
is easy!
Read this
Please login or register to view this content. Registration is FREE
that uses our
Please login or register to view this content. Registration is FREE
.
fambi is offline
Reply With Quote
View Public Profile Visit fambi's homepage!
 
Reply     « Reply to Cross-site Sessions
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35235 seconds with 12 queries