Jump to content

Do I need cookies here?


woolyg

Recommended Posts

Hi all,

Here's one that might curl your noodle. I'm writing a web app that takes submissions from users, but doesn't require a login or a password from the person submitting the content. However, I'd like the app to be able to record info, behind the scenes, unique to the person's location / computer.

 

$_SERVER['REMOTE_ADDR'] is good, but it only records their IP address, and if they are on a shared private network, then the app will get confused, as more than one person could be submitting content from that IP.

gethostbyaddr() is also good, but it's effectively an extension of $_SERVER['REMOTE_ADDR'], and doesn't give unique location / computer info.

session_id() only records the session ID for the user's currently-logged-on session, and it changes each time they close their browser.

 

Basically, I'd like person A to open the app from any PC in the world (possibly on a private network), and submit their content without needing to log in.

Then, person B opens the app, and say they're on the same private network as person A - I'd like the app to know that they are actually not person A, as they are on a different PC.

 

Get me?

 

Am I talking about cookies here? I'm new enough to PHP not to have learned about cookies yet :)

 

All thought appreciated.

 

Thanks,

WoolyG

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.