
Ghetto Geo-Location or How To Find Your Users Location Using Pron [SFW] - Corrado
http://msteigerwalt.com/articles/2008/07/18/SpecialFriends
======
patio11
_Rob wanted geolocation without actually having to pay for it_

Rather than abusing the resources of a company which you have no intentions of
doing business with (even one which is fairly odious), you could go with one
of the free solutions for this.

Here's a GPL geolocation database for you. If you're capable of tying your
shoelaces in web development, the rest should be academic.

<http://www.maxmind.com/app/geolitecity>

P.S. I largely like the free software movement. One of the core components of
it is that _we are not thieves_. I sort of bristle when I see folks confusing
the two. For my fellow shoestring budget developers here, when you see a
submission offering something for free-as-in-beer, could you please do a quick
sanity check "Does this submission advocate getting free stuff by stealing
it?" and, if the answer is yes, NOT upvote it?

~~~
paulgb
I think the author just meant to explain the nifty javascript trick and as a
warning to developers who might consider data transfered by a javascript
include to be safe. At least I hope he (Rob) is not actually using this method
on a real site.

edit: confirming my suspicions, this just popped up on the site: "This is a
security example, guys. At least I hope nobody’s using this in the real
world."

~~~
bmcleod
Someone didn't read the about page. Michelle's a she.

Apart from that, while there are much better options available now, for a
period the adult companies were sinking huge portions of their budgets into
keeping that geolocation cutting edge.

Getting as close as possible to a person's actual location is going to make
ads like these much more convincing after all.

~~~
paulgb
> Someone didn't read the about page. Michelle's a she.

Thanks for pointing that out. I ignorantly assumed the author was male. I
edited my post.

> Apart from that, while there are much better options available now...

interesting, I didn't realize that. I guess it's another example of adult
entertainment pushing technology forward.

------
ars
While using this is obviously pointless - (there are much easier ways to get
an IP geolocation), the method (override document.write), and the security
warning are interesting.

------
dfranke
This is amusingly serendipitous with today's XKCD.

------
timf
Interesting to know one can do that, but how long until this becomes
unreliable? Suddenly your website is displaying an AFF text advertisement when
they figure this out.

Geo-location is not super expensive if you really need to rely on it... (I use
maxmind.com personally).

EDIT: agree with patio11 too, don't be a dick

------
timmaah
Each service listed in these comments listed in me in a different city. Not
one of those is the city I am actually in.

Not to mention at my house I use satellite internet, so any geolocation
service thinks I'm 10 states away from where I really am.

------
whatusername
Interesting.. It seems AFF (or this script) either doesn't support spaces in
suburb names - or has something else going wrong. It picked up the first word
of my suburb, but not the "Hills" at the end.

------
jrockway
"You're using an ad-blocker."

Yes. Is there anyone who _doesn't_ block pornographic ads?

~~~
sachinag
I don't use an ad blocker. I found that they're more hassle than they're
worth.

EDIT: In response to the "why don't you?" my answer is that I've found that it
messes up layout on many sites, and it fucks up my experience on certain
video-heavy sites, including ESPN.com and MLB.com. The other answer is that I
have a large number of friends who still sell words for money, and I consider
it stealing to turn off ads. (Yes, I am the guy who once wrote a blog post who
called people who sold words for money fucking morons.)

~~~
semiquaver
In several years of using it, Adblock Plus with EasyList has never once
blocked something I wanted to see, and has let through very nearly zero ads.
The web is just _painful_ to use without it. Of course I whitelist most sites
I visit regularly, as long as they behave.

edit: Missed my sibling post, which says basically the same thing as me. I
guess we adblock users are fairly single-minded. But seriously, after using
things like host files and privoxy, ABP is very nearly magic.

~~~
rdl
The only time Adblock Plus blocked something I wanted to see is when I was
working for an advertising company and testing ads -- wondering why I didn't
see any of them. Heh.

------
justin_vanw
So, weird super obscure hack... or download geoIP from maxmind for free.

~~~
there
or don't download anything...

<http://j.maxmind.com/app/geoip.js>

~~~
justin_vanw
Neat

