Jump to content

An age old problem yet again


ocpaul20

Recommended Posts

OK, well here's the background:

 

What I am trying to do is to determine if a visitor has been to my website before, irrespective of IP address. I dont want to use cookies because some people dont allow them. They may not have logged in to my website either(in the case of robots etc).

 

So what I am thinking is if I can gather a load of available information about them and then make a checksum of it all. Then I can store that number in a file somewhere and check against it next time they arrive. It wont be perfect, I know, but it will probably be better than going on IP address or cookie.

 

The most information I can find is provided by the Javascript Browser sniffer at http://www.webreference.com/tools/browser/javascript.html

but the problem with this is that it is clientside and I dont think there is any way to get the information back to the server for me to store.

 

Is there anyway, using ajax or any other method to get theis type of information back server-side?

 

I wonder what percentage of people or robots use cookies because that is the only way I suspect might work - to read a cookie in PHP in the next page request that was written by the javascript in the previous page.

Link to comment
https://forums.phpfreaks.com/topic/113293-an-age-old-problem-yet-again/
Share on other sites

cookies could remain on teh client... but then they have control.

 

the most you would be able to do is a) set a cookie or b) ask them to login to be able to access your site.. which is imparactical in many cases.

If you set a cookie, then set it with a very long random sequence of numbers - ensure its unique to a database, and ten store the value in a database of flat file.  each time a page is viewed - check to see if that unique value is in the cookie or stored on your server.. and if it isnt then set it.

 

Thats the only way.

gdlk

PC nerd: Am I missing something but I thought that by the time the page was served to the client, the PHP program had no control over it and could not get any variables back from the client? As I understand it, PHP is a server-only language and is used to generate the html which is then served to the browser.

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.