DEV Community

PlayBossWar
PlayBossWar

Posted on

A Geoloc website for a friend

Let's start with the beginning, a friend in Ecuador got her wallet stolen, and I only knew his name.

So I started googling him a bit, found his Facebook and of course created a fake account that seems a minimum legit.
While waiting let's figure out how I can retrieve his localisation.

Remember that in some countries what I'm going to do next don't work. I tested it with my friend and the localisation gave me her exact coordinates, while in Belgium for example it gives me a location 100 km away.

I found a pretty cool Json API that allows me to get the localisation data that is linked with the ip that is used to do the request : http://gd.geobytes.com
So with a simple fetch it was really easy to get the information if someone opened my website.
Now the problem is a bit tricky, since it's a static page and I don't want to install a node-js back-end, just upload the files to a server host and done, so I decided to email the information to myself.

After a little bit of research, I found PostMail https://postmail.invotes.com/ , and it worked great.

Tried it myself and I can easily get the information in my mailbox of anyone who visits this page.

GITHUB REPO : https://github.com/titivermeesch/geoloc-website

There is just one downside, someone can simply extract the token I use to send the mails and use it for himself, but yeah, that's the risk I take to catch that thief.

Thanks for reading. Hope my first article is interesting.

Top comments (0)