Get unique value of a user other than IP - php

I am developing a PHP application, only used by our employees in 3 diff locations. I want a when, whom, where log. I am getting only 3 unique IPs, since all of them using internet via proxy and chrome browser mostly. Is there any other unique value other than IP or Browser info? that should be record by javascript or PHP. I know there is a security problem of getting computername or local ip, but please suggest and anyother solutions.
Waiting for your valuable suggestions

You could use session/cookies? But for something like this, you should really have a log-in sort of system.

You may consider using Google Maps Geolocation to find and store the zipcode:
https://developers.google.com/maps/documentation/business/geolocation/

Related

Is it possible to identify every separate computer?

I am thinking of a very simple log in system that doesn't require a login, but instead a system with an id and store it in a database. Then when the user comes back to the website he gets matched with his unique ID and logged-in in that way.
I am trying to do this with php as much as possible, initially I wanted to do it by using the IP address but as some people pointed out, places such as campuses share the same IP for many, many users.
So is there any way to uniquely identify each computer without using cookies, sessions or anything else that is client-side. Preferably with php.
No it is completely impossible to do what you are asking. The only theoretical way would be, as you say - the MAC address but it is not sent in web requests.

Unique page views count (cookie vs. ip address vs. anything else)

I am going to add page views count to my website, where views will be updated in the database. Previously, I have done similar think and I used users' ip address to determine unique views.
Now, I just wonder if I should use cookies instead. I can not understand which one is better. Or should I use both for more strictness?
Somebody with confident mind about this problem, please respond and I will accept your point of view. I just need a little bit more confidence to choose either one or second.
P.S. If you think there is better alternative to those two please be kind to tell me.
Thanks.
Use google analytics
Use somekind of http log reader/parser.
Take a look at http://www.phpmyvisites.us/
what happens when 5 PC's connect to your site from the same IP, let's say they are behind a wireless router, is that a good count ? what if the same person who viewed the page had an internet connection with dynamic IP like most broadband internet connections are today
cookies could do the job, but I'm not sure how to tackle this problem and why track at a client level where he navigated, cookies can also be deleted or blocked ...
an easy way would be to use google analytics or google webmaster tools

get full client details in client

I want to get full details of a client who visits my site. I know I can get his/her ip by $_SERVER but I want to know where exactly his/her ip is reserved by. For example, I want to know which university visited my website. I used http://www.geobytes.com/IpLocator.htm but it just tells city, country and another things but it doesn't show what I need.
Thanx
Being realistic, you might as well use a service such as Google Analytics - they'll be able (where possible) to tell you the origin domain which is about as accurate as you're likely to get. (In many instances, you won't be able to obtain even something this useful.)
Alternatively, if you require this in something approaching real-time, you'll could attempt to obtain the reverse name lookup of the IP address, etc. or use one of the many IP to location based services available.
However, I wouldn't labour under the illusion that you'll be able to discover who's browsing your website in a reliable and meaningful way at the level of detail you seem to believe is possible.

It is possible to use a custom IP with the geolocation feature of Google Chrome?

today i tested the geolocation system implement by google on Chrome, with this page: http://www.browsergeolocation.com/ , the think is, is possible to use this service but without my ip?, i mean, using other ip to retrive the geo info.
PS 1: I know the are many sites that offer iptogeo services, but they only give you a very general address. This particular service gave not only the country and the state, it gave even the street!
PS 2: I post this question here because i know the solution may be on code. Thanks!
According to W3C,
The Geolocation API must be agnostic
to the underlying sources of location
information.
So no, given that the source might be an onboard GPS or triangulation based on on nearby SSIDs, it cannot be done with only an IP. You'd anyway only get as good result as from the iptogeo services if it worked, as Google can't reach into my computer and read my GPS. Yet.
I don't think you can use it for other peoples IP. The site uses location aware browsing which is a browser feature and needs to be authorized by the user. The user's browser also may provide additional information that only they have access too.
You can read more about location aware browsing at Geolocation in Firefox. This page is for firefox, but describes some important things.
FYI the accuracy for my result was limited to just my city.

What is the best way of displaying items close to someone on a page using php

Basically, I want to display local events to people on a page. So if you were from California you would have different things than someone from Florida. I am going to be using php for the rest of the project so php is a must.
I would prefer to get the data without having to ask the user for additional information. IF I have to ask for additional information, I would want to use a zipcode than I would save that zipcode to a database with their ip so I didn't have to ask again.
I would imagine the GEO IP functions would get you 90% of the way there, if not all the way.
How will you know the location of the person?
For example, you can't go by the ISP, as their ISP address may be in a different state than the user.
If they have to log in then you can know where they were when they logged in, but what if the are on a trip and so staying elsewhere, now your information is wrong.
That would be the first challenge.
Depending on how fine-grained you are trying to get will determine what your database looks like. For example, while I am going down a street, if I am using a mobile device, will you be able to use my GPS data to determine what gluten-free restaurant is close to me? Or is it based on a city or metropolitan area?
Are you using GPS data?
How will you get the local events to update your application?
There is a great deal of information left unanswered to be able to really give you a good answer.
Are you trying to guess the visitor's location? If that is what you want, see the PHP GeoIP extension or MaxMind GeoIP api. They both use the same database and offer free and paid databases.
One problem with this method is that the IP address does not guarantee an accurate location. It is often a good starting point though. You should make it easy for the visitor to correct their location.
A potentially more accurate method is to use the HTML5 geolocation api, but this is experimental and only supported in the latest browsers. Even with browser support, the site visitor needs hardware capable of finding their location or a plugin that allows them to set their own location. If you go this route you should have a fall back based on the GeoIP result.
You could look up their IP address in a geolocation database like other people have mentioned, and as everyone has pointed out, it's not foolproof but it should work most of the time.
You could also take a look at using Firefox's location-aware browsing, which again isn't foolproof -- yet it does accurately pinpoint my very house when I use it. Of course, this would only work for Firefox 3.0+ users, and only after they click the "accept" button, so it's obviously not without issues.
Whichever way you choose to go, just make sure there's an override somewhere! Your method might work 99% of the time, but if I'm in the 1% of people who are never shown the right information, that'd be really really annoying!

Categories