Page 1 of 1
how to create a popup only accessible via my website
Posted: Thu Aug 10, 2006 11:53 am
by Mijanur
Hi
how can i stop other people from using my popup that i have on my website, what can i do so people can only access the popup only through my site??
thanx for you time
Myjaan
Posted: Thu Aug 10, 2006 1:21 pm
by feyd
I don't see the connection to PHP here. This is a client-side issue. Moved.
Posted: Thu Aug 10, 2006 7:54 pm
by Benjamin
This is a php issue because it needs a permission based system using sessions or cookies.
Posted: Fri Aug 11, 2006 3:45 am
by thiscatis
With a referal check it can easily be done
Posted: Fri Aug 11, 2006 3:58 am
by Benjamin
I would recommend setting a session or cookie variable valid for a specific period of time.
ie (psuedo)
Code: Select all
// you have to be here first..
session_start();
$_SESSION['isAuthorized'] = 'yes';
$_SESSION['authTime'] = // microtime or something
Code: Select all
// now you can look at this..
session_start();
if (!empty($_SESSION['isAuthorized']) && ($_SESSION['isAuthorized'] == 'yes') && ($_SESSION['authTime'] >= ($now - 20000))) {
// display the page
} else {
header("Location: http://gobacktowhereyoucamefrom.com");
}