Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-11-2002, 03:18 PM   #1
magnatique
Confirmed User
 
magnatique's Avatar
 
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
how to verify if session cookies are enabled with PHP

is there any way I can verify if session cookies are enabled on a user's browser?
__________________

Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks
Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites
magnatique is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 03:36 PM   #2
LUCL0NELY
So Fucking Banned
 
Join Date: Sep 2002
Location: AZN KLAN'S MAIN LAND
Posts: 1,527
yes
LUCL0NELY is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 04:23 PM   #3
magnatique
Confirmed User
 
magnatique's Avatar
 
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
now that's helpful
__________________

Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks
Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites
magnatique is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 04:25 PM   #4
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
probably not with a single http request
try to set it in the first request, then try to read it in the second one
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 06:25 PM   #5
Rory
Confirmed User
 
Join Date: Jul 2002
Location: I Love Ixtapa, Mexico ö
Posts: 616
Quote:
Originally posted by magnatique
is there any way I can verify if session cookies are enabled on a user's browser?
Do this :

PHP Code:
<?php
$ref 
$_SERVER['PHP_SELF'];
setcookie("test","working");
header ("Location: http://www.yourserver.com/verify_cookies.php?ref=$ref");
exit;
?>
Paste that anytime you wanna verify if cokkies are enabled.

Then save this as a file named verify_cookies.php :

PHP Code:
<?php
$ref 
$_GET['ref'];
$test_cookie $_COOKIE['test'];

if (
$test_cookie == "working") {
header ("Location: http://www.yourserver.com/$ref");
} else {
header ("Location: http://www.yourserver.com/youaintgotnocookies.php");
}
exit;
?>
Make modifications where needed.

Rory


Edit: Parse URLs doesnt work too well in code

Last edited by Rory; 12-11-2002 at 06:27 PM..
Rory is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 07:01 PM   #6
Backov
Confirmed User
 
Join Date: Mar 2001
Location: Cat Detector Van
Posts: 1,600
Very easy (you should have just asked me again Mag)

You don't have to. Ignore the code above, again.

Do this:

echo "&lt;a href='blah.php?'" .SID. "&gt;";

SID is the session ID, and it will only be appended if it's needed (ie, user doesn't have cookies enabled.) Remember, it's not $SID - it's SID.

Cheers,
Backov
__________________
<embed src="http://banners.spotbrokers.com/button.swf" FlashVars="clickURL=http://banners.spotbrokers.com" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="120" height="60"></embed>
Backov is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 07:56 PM   #7
Rory
Confirmed User
 
Join Date: Jul 2002
Location: I Love Ixtapa, Mexico ö
Posts: 616
Quote:
Originally posted by Backov
Very easy (you should have just asked me again Mag)

You don't have to. Ignore the code above, again.

Do this:

echo "&lt;a href='blah.php?'" .SID. "&gt;";

SID is the session ID, and it will only be appended if it's needed (ie, user doesn't have cookies enabled.) Remember, it's not $SID - it's SID.

Cheers,
Backov
Sorry didnt mean to confuse anyone. I misread his post and didnt see the session part before cookie. As Backov said you shouldnt rely on cookies when tracking sessions anyhow ... especially with a built in constant. Above would be how to detect if the user has cookies enabled or not however

Rory
Rory is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-11-2002, 09:05 PM   #8
madness
Registered User
 
Join Date: Jun 2002
Location: Toronto
Posts: 37
Is this really who I think it is? Magnatique aka Phillip aka the cute guy who never replied my emails or returned my phone calls last year? You, my man, need some serious spankings!
__________________
madness is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-12-2002, 11:43 AM   #9
magnatique
Confirmed User
 
magnatique's Avatar
 
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
Backov, didn't want to disturb you on your birthday hehe..

will get back to ya today though ;)

----

madness, are you the lady formerly known as pam?
if so I never got any calls from ya lady :P

and you were the one ignoring my emails if I remmember lol... something about I'm out of the biz hehe
__________________

Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks
Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites
magnatique is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-12-2002, 06:11 PM   #10
madness
Registered User
 
Join Date: Jun 2002
Location: Toronto
Posts: 37
Yep! That's me. I'd have to get the emails first in order to ignore :p Anyways, I called you to the California number you emailed me and left messages on an answering machine.. a while ago when I still used to be single lol. Yeah.. got married in August

You are right I quit on this bus in Jan but I still help out training newbie affiliates of ToyTeen with promotion and stuff in my spare time Btw, your galleries look good you know where
__________________
madness is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.