Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Crazy Joe - helmikuu 11, 2006, 03:03:16 IP

Otsikko: SSI - Staying Logged in from a Remote Server
Kirjoitti: Crazy Joe - helmikuu 11, 2006, 03:03:16 IP
Hello! I have done lots of searching and have been unable to find a solution to my particular problem. I have my main page hosted on one server and my SMF forum on another. I am trying to create a login function on the main page. I tried using the following code:

<?php include("http://www.site.com/forum/SSI.php?ssi_function=login"); ?>

Although the login box shows up and will log me into the forum correctly, I am unable to stay logged in when returning to the original main page. The login box is present again, even if I'm already logged in. Likewise, the welcome function recognizes me as a guest. I believe that this has something to do with the session cookies but am not sure. Does anyone have a solution? Thanks in advance!
Otsikko: Re: SSI - Staying Logged in from a Remote Server
Kirjoitti: kegobeer - helmikuu 11, 2006, 04:51:38 IP
Cookies can't be shared across domains and servers.
Otsikko: Re: SSI - Staying Logged in from a Remote Server
Kirjoitti: Crazy Joe - helmikuu 12, 2006, 03:56:05 IP
Thanks, kegobeer. But would it be possible/probable to write a script which would extract the information from SMF's cookie and save it to one on another server or to set the cookie's permissions to be accessible by another server? Are there any workaround solutions? Thanks.
Otsikko: Re: SSI - Staying Logged in from a Remote Server
Kirjoitti: kegobeer - helmikuu 12, 2006, 04:22:27 IP
Nope.  There's a huge reason why this can't be done: security.
Otsikko: Re: SSI - Staying Logged in from a Remote Server
Kirjoitti: Crazy Joe - helmikuu 12, 2006, 04:33:55 IP
I understand, and thanks for your help. I suppose I'll just have to put the main page on the same server as the forum.