Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 08:00 am EST
Geeklog Forums
Cookie Code?
Status: offline
Creator
Forum User
Full Member
Registered: 07/11/02
Posts: 181
Location:Austin, TX
What is the GL PHP code for cookie detection? Currently I have a GL 1.3.5sr2 installation set up in http://subdomain.mydomain.com/public_html. As it is a subdomain, I had to create the public_html directory and an index.html in the "root" that redirects to index.php in public_html, and so on forth.
Anyway, since my site has Flash and QuickTime here and there, my index.html is basically a warning that there's Flash/QT and options to download, etc.
What I need is a way to detect GL cookies from this index.html, and if they are present (meaning this person has been here before), to automatically redirect to /public_html/index.php without the returning visitor ever having to see the "warning" page again.
I'm no programmer, though I know enough to mess with code here and there without worrying about screwing things up, so this is why I'm asking if anyone knows anything about this and if it's possible to write a short php script to detect the cookies then redirect (or not)? If it is possible, could this person (you, maybe) write the code? I'd be more than happy to reciprocate with either web design/reasonable hosting (no porn sorry)/graphic design.
Regards,
Lee
L. Whitworth
L. Whitworth
6
5
Quote
matrix9180
Anonymous
make a file called index.php in your root directory (this will replace index.html) use the code <?
if!isset($_COOKIE['flashwarning']) {
setcookie('flashwarning',1,time()+100000000);
echo("flash warning. blah blah blah);
} else { header("location: /public_html"
}
?>
6
6
Quote
Anonymous
Anonymous
So I'd have to echo each line of index.html? Or could I merely include the source HTML file?
7
6
Quote
All times are EST. The time is now 08:00 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content