Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
how i can see ips who dont accept cookies
Old 10-27-2010, 11:20 PM how i can see ips who dont accept cookies
ZoC
Skilled Talker

Posts: 68
Trades: 0
hello there, is any way to i can see if the ip accept cookies or not ? i want to block on my website all the ips who dont accept cookies ... please help with this, thank you
ZoC is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-27-2010, 11:45 PM Re: how i can see ips who dont accept cookies
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
The only definite way I know of to check if a user can accept cookies is to set one and then attempt to retrieve it on another page load. I don't recommend blocking the IP address of that user if they cannot accept cookies. A user's IP address may change and multiple users might have the same IP over a period of time.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 10-28-2010, 12:14 AM Re: how i can see ips who dont accept cookies
ZoC
Skilled Talker

Posts: 68
Trades: 0
can you give me some examples how i can make this
ZoC is offline
Reply With Quote
View Public Profile
 
Old 10-28-2010, 01:21 AM Re: how i can see ips who dont accept cookies
Average Talker

Posts: 15
Trades: 0
Hey nullpointer
Can you share the code for the IP tracking??
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
almedajohnson is offline
Reply With Quote
View Public Profile
 
Old 10-28-2010, 02:35 AM Re: how i can see ips who dont accept cookies
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by ZoC View Post
can you give me some examples how i can make this
Basically what you need to do is set the cookie and attempt to retrieve it on another page load.

PHP Code:
if(isset($_COOKIE['test']) && $_COOKIE['test'] == 1)
{
     
//cookies are enabled
}
elseif(
$_GET['cookieset'] == 1)
{
     
//cookies are not enabled
}
else
{
     
setcookie('test'1time()+3600);
     
header('Location: thispage.php?cookieset=1');

Quote:
Originally Posted by almedajohnson View Post
Hey nullpointer
Can you share the code for the IP tracking??
Create a new thread and clarify what you are trying to do and I'd be happy to help. In the future, even if your problem is related to someone else's it is best just to create a separate thread.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 10-30-2010, 03:09 PM Re: how i can see ips who dont accept cookies
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by NullPointer View Post
T A user's IP address may change and multiple users might have the same IP over a period of time.
And search engine crawlers do not accept cookies.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to how i can see ips who dont accept cookies
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20816 seconds with 12 queries