Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

SSI - Staying Logged in from a Remote Server

Aloittaja Crazy Joe, helmikuu 11, 2006, 03:03:16 IP

« edellinen - seuraava »

Crazy Joe

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!

kegobeer

Cookies can't be shared across domains and servers.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Crazy Joe

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.

kegobeer

Nope.  There's a huge reason why this can't be done: security.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Crazy Joe

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.

Advertisement: