doc1355 Posted October 31, 2010 Share Posted October 31, 2010 On my website, I have links to another website. The problem is, when I clink on the link for the first time, the target website gives me the error "Your session has expired". Then I have two options: [*]Close that window and click on the link again: this will load the page without any problem. [*]Refresh the window with the error message, again page loads with no issues. This is not very convenient for my users. I wonder if there is any way to fix this problem from my end using some coding? Not sure how. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/217352-sessioncockie-problem-with-link/ Share on other sites More sharing options...
gevans Posted October 31, 2010 Share Posted October 31, 2010 Can you show an example of this? Is it online? Difficult to offer any help with no information to work from. Quote Link to comment https://forums.phpfreaks.com/topic/217352-sessioncockie-problem-with-link/#findComment-1128640 Share on other sites More sharing options...
doc1355 Posted October 31, 2010 Author Share Posted October 31, 2010 Here is the target link that gives me the error: https://freida.ama-assn.org/Freida/user/programSearchDispatch.do?method=searchByPgmNbr&pgmNumber=3801166051 Quote Link to comment https://forums.phpfreaks.com/topic/217352-sessioncockie-problem-with-link/#findComment-1128642 Share on other sites More sharing options...
gevans Posted October 31, 2010 Share Posted October 31, 2010 It looks like the website sets a seesion when you visit the site, and later pages (such as the search) require that session to be set, so there's nothing you can do to get a direct link to a search page without getting the session expired error first. Quote Link to comment https://forums.phpfreaks.com/topic/217352-sessioncockie-problem-with-link/#findComment-1128648 Share on other sites More sharing options...
doc1355 Posted October 31, 2010 Author Share Posted October 31, 2010 I undrestand the process. But, my question is how can I expire the session from my end? Is there anyway I can expire the session using a URL or script from my website? The other thought I had was to may be load two windows in a row, first window to load the page and then close automatically, this way it will reset the session, and then the next window opens with the new session. I'm not sure if any of these are doable and if so, how exactly to do this. Thank you for your help. Quote Link to comment https://forums.phpfreaks.com/topic/217352-sessioncockie-problem-with-link/#findComment-1128652 Share on other sites More sharing options...
gevans Posted October 31, 2010 Share Posted October 31, 2010 If you really wanted to force it I guess you could open it in a new window using javascript, then refresh the new page instantly so the session has been created. I found this while doing a quick search, not tested; var mypopup = window.open('https://freida.ama-assn.org/Freida/user/programSearchDispatch.do?method=searchByPgmNbr&pgmNumber=3801166051'); mypopup.location.reload(); Quote Link to comment https://forums.phpfreaks.com/topic/217352-sessioncockie-problem-with-link/#findComment-1128656 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.