I am developing dummy laptop locator generator. I would like to know if there is any way to detect user's precise city based on their home IP?
I thought I would use maxmind.com API but it sometimes doesn't detect city right. For my home IP it detected right but for my VPS it didn't. I really need some solution to detect city 100% right and if possible street with GPS coordinates. Is it possible?
It is not possible to determine someone's location by their IP address alone with any reasonable reliability.
Related
I'm looking for something that allow me to get devices (pc, Mac, phone and tablet) unique id like a MAC address can be.
I need to track all logins into a protected area but i'm unable to find an unique id with whom I can identify the used device.
I need that because I want the user to register their devices and then let them login only with that. Thanks
You can’t really. It would be a huge security/privacy risk to do that. However, there some things that you could do to get close:
Add a cookie to that device with a UUID
Fingerprinting - Use all available browser settings available to JS such as browser agent, installed fonts etc. to build up a unique-ish profile of a device (Note. Apple try to prevent this in the latest version of Safari)
IP address. It’s not perfect but is can do something and there are ways to remove a small degree of obfuscation. This is an example in PHP: How to get Real IP from Visitor?
Combining all of these things together should be able to give you something close to what you want. It may not completely protect it, but it will offer some form of it.
JavaScript is a high level programming language which can not help you storing such information. Same applies to PHP as well.
However, you might want to consider making use of cookies to achieve your goal. You can use a cryptographic algorithm and store it in a cookie, and you have a unique identifier.
Me and my team we are working on a project for University. Our goal is to prevent people that are outside of a specific range to enter our wireless network. Lets say u are sitting in Starbucks and next to that there is another coffee shop. If u are a starbucks customer you will be able to enter the network and surf the internet. If you are sitting at the coffee shop next to starbucks though u will still see the wireless on your device but you won't be able to connect, or if you connect you will get kicked automatically.
My question is . Is there a way to get all the mac addresses of all devices in a specific area (Sturbucks building) and then only allow those to enter the wireless network. If thats possible through a mapping of a network or a device we don't care. We just want a way. And also is there a way to determine where exactly is a device,its location ? With or without a GPS.
The answer of all your questions is: NO.
You cannot get the mac adresses of foreign networks (sturbucks) without hacking the routers
You cannot get the location of a device in general. If the device is connected to your router, hotspot, Wlan, etc, you then could know that. In generall you cannot get the device GPS position, only if the user of the device allows that.
The other location possibility is the cell tower the user is logged in, that does not help you because you will not get the info in wich GSM cell the user is connected, without hacking the GSM network, and probably sturbucks and the uni has the same cell tower.
Remain wlan locationing: Here the same, the device might know it but you not.
Update:
There is one solution I remember now. Remeber the waste bins installed in London on public roads, they track when user pass by. They behave like WLAN devices, and track the mac adress. You could create such a system, maybe you cannot buy that. And place it near the entrance of the shop. Users which pass by have their mac adress recorded, you send that mac to your special wlan router and add that macs dynamically. Another possibility would be the use of bluetopot but this has to be enabled on the phone:
Look at the system how Apple's low energy blue tooth "location beacons" work: It is build for indoor positioning. you can triangulate the signal strength of a device. But probably the effort is beyond your project budget. (And still the useres woul dhave to enable blue tooth)
I want to be able to push messages out to certain customers who have a particular postcode. Is this possible with C2DM or is it a case of only pushing to everyone who has the application?.
It is not possible to determine the postcode of a device via C2DM. But you might use the
localization feature of Android and use this information to find the postcode.
Edit: Or just ask the user to enter his postcode ;)
Thus, your application needs to register at your server it could also submit the location information (in another step), and you could save it in your database along the device id.
Then you could send a message to all users that are in a specific area.
Google maps, ip location etc. working good.
But none of the services are locating a computer exactly where it is on a map.
Anyone know any api which can locate a computer on a map without user inputs.
I am tired of ip location, it is not at all exact and my client is not happy. :(
Thanks
Gobi
What you're trying to do is not possible without specialized hardware. Google maps on cell phones without GPS uses cell tower station information. Most other phones use actual GPS receivers. With neither of those, the only way for your network-attached computer to tell where it is is by looking at who owns its IP address, which is what the IP location stuff does. Unfortunately, that database has pretty low geographical resolution. If you really want accurate and precise location information, you have to have a GPS receiver.
This cant be done unless you have some GPS device connected to the computer. But I guess it is forbidden in the licence to use real time tracking in Google Maps, but I might be wrong.
There's one more way, but I don't know how practical it is: visible wifi networks. If your PC has wifi hardware then you can often correlate the list of networks that you can see to an approximate location based on databases of networks and position. This is how e.g. iPod touches can locate themselves, and iPhones when there's poor GPS reception in built-up areas.
But even if your end-user has wifi hardware and you can somehow read the network list from it then I'm not sure if there are public datasets for this though.
The W3C Geolocation API allows websites to request the user's best available location from the browser. In some cases this will use IP geolocation which you've already seen to be inaccurate, but it can sometimes do better.
The API is agnostic to the device and the method used to obtain location; on an iPhone, the Geolocation API may use cell tower triangulation, available WiFi network lookup or GPS satellite geolocation, or some combination. On Firefox or Chrome on the laptop, Google uses WiFi networks and IP address to give a location which is often much, much better than IP geolocation alone.
If you had a GPS attached to your computer, it's possible that your browser could take advantage of that too -- it's expected that future versions of Internet Explorer will support the W3C Geolocation API using the Windows 7 Location Platform, which can accept location from an attached GPS or manual entry or some other plugin.
I have a task to validate addresses entered into a system I am currently creating. The system requires that address entered are validated against a valid data source. In the UK the dataset comes from the Royal Mail and is expensive to access.
The data needed is post code info for the whole of europe to start with accessed by an API into the web application.
There are a number of companies that offer this service,
QAS
Capscan
Postcode anywhere
These all offer the service I require. However this is expensive and in some cases not a complete data set. e.g. not Ireland
I was also wondering if there would be a way to utilize the Google Maps API to validate this data via postal code and country.
Would the google maps method be possible or do I have to go down the line of one of these expensive companies? Any thoughts on what line I should take.
The answer probably depends how critical it is for you to receive support and possible customization for this service.
Google can certainly do this. Look into their XML and Geocoding API's. You should be able to craft an XML message asking Google to return Map coordinates for a given address. If the address is not found (invalid), you will receive an appropriate response. Here's a useful page: http://code.google.com/apis/maps/documentation/services.html#XML_Requests
Note that Google's aim in providing the Maps API is to plot addresses on actual maps. While you can certainly use the data for other purposes, you are at the mercy of Google should one of their maps not exactly correspond to your legal or commercial address validation needs. If you paid for one of the services you mentioned, you would likely be able to receive support should certain addresses not resolve the way you expect them to.
In other words, you get what you pay for ;) . If you have the time, though, why not try implementing a Google-based solution then going from there? The API looks pretty slick, and it's free, after all.
Google's geocoding api does what want you want. As Xerus points out, as long as you are not using the geocoded points on a non-google Map, you should be good (terms of service). Specifically,
3.1 Use without a Google Map. Customer may use Google Maps Content from the Geocoding API in Customer Applications without a corresponding Google Map.
3.3 No use with a non-Google map. Customer must not use Google Maps Content from the Geocoding API in conjunction with a non-Google map.
I am both a web developer and a former employee of one of the companies you mentioned. I completely understand where you're coming from. Verifying addresses seems like a simple problem to tackle, but it's very much an iceberg. I suppose one workaround to the legal constraints of the Google or Yahoo! Maps APIs is to request your users verify their addresses on a map. If I were in your shoes, though, I wouldn't go that route.
The reason address verification services are so expensive is that they require licenses and ongoing relationships with grumpy, bureaucratic postal authorities (including the Royal Mail). Unfortunately, postal authorities are the best (and often the only) sources of data against which to verify addresses, so there really isn't any other way to go about it. The bottom line is you need to weigh the cost of bad addresses (usually a question of mail volume) against the cost of the software to verify them. Irish postal data is even more rubbish than Irish postal formats (which frequently omit building numbers), so there's little you can do about those addresses.
The answer depends upon the degree of confidence you place in the data and how your data is being used. For example, if you're using it for mailing or shipping, you'll want to be be confident that the data is correct. If you're just using it as another fraud-prevention mechanism then you could potentially allow a degree of error to creep into the data.
If you want any degree of real accuracy, you're need to go with a service that does real address verification and you're going to have to pay for it. As has been mentioned by Adam, address verification and validation at first seems simple and easy, but it's a black hole fraught with challenges and, unless you've some underlying data to work with, virtually impossible to do by yourself. Trust me, you're actually saving money by using a service. You're welcome to go down this road yourself to experience what I mean, but I can guarantee you'll see the light, so to speak, after even a few hours (or days) of spinning your wheels.
I should mention that I'm the founder of SmartyStreets. We do address validation and verification addresses and we offer this for the USA and international as well. I'm more than happy to personally answer any questions you have on the topic of address cleansing, standardization, and validation.
Another option is YADDRESS.
Validate it against FedEx's api. They have an API to generate labels from XML code. The process involves a step to validate the address.
Google basis (free) does not provide address verification (Geocoding) as there is no UK postcode license.
This means postcode searches are very in-accurate. The proximity search is very poor, even for town searches, often not recognising locations.
This is why Google have a premier and a enterprise solution which still is more expensive and not as good as business mapping specialists like bIng and Via Michelin who also have API's.
As a free lance developer, so serious business would use Google as the system is weak and really provides a watered down solution.
I know that this post is a bit old but incase anyone finds it still relevant you might want to check out the free geocoding services offered by USC College. This does included address validation via ajax and static calls. The only catch is that they request a link back and only offer allotments of 2500 calls. More than fair.
https://webgis.usc.edu/Services/AddressValidation/Default.aspx
You could consider using CDYNE's PAV-I API that validates international addresses. international-address-verification They cover over 240 countries, so it should cover all of the countries that you are looking to validate for.
A great blog describing 14 address finders:
https://www.conversion-uplift.co.uk/free-address-lookup-tools/
Many address autocomplete services, including Google's Places API, appears to offer international address support but it has limited accuracy.
For example, New Zealand address and geolocation data are free to download from Land Information New Zealand (LINZ). When a user search for an address such as 76 Francis St Hauraki from Google or Address Doctor, a positive match is returned. The land parcel was matched but not the postal/delivery address, which is either 76A or 76B. The problem is amplified with apartments and units on a single land parcel.
For 100% accuracy, use a country-specific address finder instead such as https://www.addy.co.nz for NZ address autocomplete.