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
https://forums.phpfreaks.com/topic/202099-do-i-need-cookies-here/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.