We need to show a page in case users come from a specific URL therefore we can achieve it with the following:
$refererSite = Mage::helper('core/http')->getHttpReferer();
however if user is not active for 30 minuets, the page should automatically be redirected to homepage.
We can create a session for the user by
Mage::getSingleton("core/session")
and give some time to it
$myValue = time();
Mage::getSingleton('core/session')->setLoggedTime($myValue);
I know the PHP way that is
header("refresh:1800;url=homepagexxx.php");
but is that what I should do?
Now one question is do I need to create a session at all or whoever comes already has a session and I need to set a time limit for it? if yes how to set a time limit and use it for refresh?
I am not sure how to tell that if session is not active for 30 minuets then redirect them to the homepage.
based on my experience even if you are not active, nothing will happen to the frontend webpage, Then I have to do something to force the page to refresh again.