GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP guys .. how to detect nocookie traffic ? (https://gfy.com/showthread.php?t=164383)

Andy 08-15-2003 01:31 PM

PHP guys .. how to detect nocookie traffic ?
 
the topic's name says it all .. I need to know who does have cookies enabled and whoe doesn't ..

jwerd 08-15-2003 01:34 PM

You could log all the ip addreses daily, and then at the end of the day have them deleted. Each ip address, uniquely, would count as a hit. Then at the end of the day, tally up everything and delete that file via cron job :)

simple stuff.

nibbi 08-15-2003 01:42 PM

when someone comes to the page, set a cookie and try to read it back. If you can read it, then their cookies are enabled.

PHP Code:

<?php
setcookie
("foo","bar"); 
if(
$_COOKIE['foo']) {
    echo 
"Cookie is enabled"
} else {
    echo 
"No Cookies enabled";
}
?>


plsureking 08-15-2003 01:42 PM

http://www.codingclick.com/article.php/aid/19

richard 08-15-2003 02:41 PM

Here's one i made earlier:

http://www.ip-sorter.com/php/cookie_test.php.txt

remove the .txt extension to demo it.


All times are GMT -7. The time now is 09:08 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123