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
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

Link to comment
Share on other sites

yeah.

 

on the page - when they visit you nex.. you simply have an included file at the top the page - that checks for the user data etc.

 

theres a range of things you can do this by - but thats the most common method.

 

gdlk

Link to comment
Share on other sites

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.

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.