National Pride

Let’s say, on one’s website, one has a form, and ‘Anonymous’ is allowed to create documents with it. Now, let’s say, one only wants one’s own ‘anonymous’ compatriots of Oceania to create documents with this form, but wishes to completely deny the evil, subhuman citizens of Eurasia and Eastasia the ability to use this form to create documents. (Unless, of course, they have registered and logged-in.) They may also ‘anonymously’ peruse one’s website, and bask in Oceania’s glory, just not post on it (unless they’ve logged-in).

Could people suggest a few ways to do this? I’ve never done anything so esoteric like this before and I have no idea where to start. Yes I know there’s no fool-proof way to completely stop non-Oceanians from pulling funny IP-tricks (thereby masking themselves as Oceanians) and creating documents with this form, but anything that KINDA/SORTA/MOSTLY works is jim-dandy with me.

I’d prefer to do this on the Form level, but i’m open to suggestions about solutions on the DB and Server level.

I believe McGyver fixed this once. I hear he used ‘remote-addr’ , ‘whois’ and a turkey-baster, but I don’t know for the life of me how he did it. Does anyone know?

Subject: National Pride

I’ve never done this with Lotus Notes but I did do it with Perl (using gethostbyaddr).

With the name you can get the country code (e.g. uk, au, ca). Of course the assumption is .com is United States.

The problem with this approach is you could have someone who is working in Australia who works for a international company located in Europe (or passing through a central corporate firewall) so their IP will state they are .eu, .uk, .de but the employee themselve are located Oceanians. Also .com assumption of U.S. is a BIG assumption that may not be true.

You maybe able to get more information from the IP address, beyond the country code, maybe this will give you a bit more information.

Subject: RE: National Pride

I agree. Google, among others, knows I live in a french-speaking part of Canada and always presents me with the french version unless I make my IE settings say I’m from an English-speaking part of the country. In either case, it is aware that I am accessing it from a canadian computer unless I’m using an anonymous proxy.

There is surely a way of sending an online database request for an IP lookup like a condensed programmable whois that can return a country of origin based on the resolved IP Address of your incoming traveler.

You might have to use AJAX to send the data request asynchronously, or you can build such a transaction into a default redirector page.

Subject: RE: National Pride

There is surely a way of sending an online database request for an IP lookup like a condensed programmable whois that can return a country of origin based on the resolved IP Address of your incoming traveler.

That’s EXACTLY what i’m after. Has anyone written one for Notes?

You might have to use AJAX to send the data request asynchronously, or you can build such a transaction into a default redirector page.

I appreciate the idea of using AJAX to perform some tricky ‘sleight of hand’ redirection, and will certain pursue such a proposal at a later date.

But let’s say, again, the Oceanian Ministry of Truth has a major love for writing for browsers (and sometimes, not even browsers) that don’t support Javascript (for example, those text-reading things that blind people use). Thus, there is a blanket Ministerial policy against the use of Javascript. Thus, AJAX is a no-no.

Not to mention a bit of URL-tomfoolery can bypass an AJAX redirection. It’s not as air-tight as, for example, having only Oceania in an Authors field - if you get my drift. (Yes I know this wouldn’t work because this assumes logging-in and, as I said in my OP, anonymous Oceanians are supposed to be allowed to post.)

However, the bit you said first about some sort of SOMETHING that does an IP lookup is what i’m thinking. Append that idea with something along the lines of what I said about an Authors field or a “Only Oceanians are allowed to create documents with this form” kinda thing. This would prevent URL tom-foolery.

But again, those ideas still assume logging-in. Surely there’s a McGyver out there among us who knows how to prevent anonymous non-Oceanians from posting??

Subject: RE: National Pride

The easiest way is to manufacture evidence of Eastasian Eurasian government support for these spammers, then El Presidente Tyranis of Oceania can invade and bomb them all back to the stone age. Nothing says Spam filter better than a smart bomb.

:stuck_out_tongue:

Subject: RE: National Pride

I like your suggestion and will pursue it at a later date, however R6.5 does not have a @Incriminate(NationName) function, although @Command([AdminCrossCertifyIDFile]) looks pretty sweet for now.

Subject: RE: National Pride

If you paste the URL below into the address bar of your browser (obviously replacing the xxx.xxx.xxx.xxx with a real IP address) it will return the country code for the IP address specified.

All you need to do then is design a mechanism (useing AJAX or AHAH or something like) to capture the country.

This will, of course, prevent me, as a pesky Eurasian, from accessing the site in question.

http://api.hostip.info/get_html.php?ip=xxx.xxx.xxx.xxx

Alternatively you can use the following which returns XML.

Makes it easier to find the country element that way

http://api.hostip.info/?ip=xxx.xxx.xxx.xxx

Subject: RE: National Pride

Chris, you make me wanna rock-out with my Designer client out! This sounds more kinda like what i’m after!

However, I have two comments:

  1. As I mentioned earlier, I have issues with AJAX just because my website has to cater towards people who don’t have Javascript; and

  2. I am more inclined towards a server-side solution, so writing something which calls to a web service like you have suggested i’d prefer write as a server-side agent. I’ve never written anything like that before, so i’m wondering, is this beyond the capabilities of Lotusscript?

Subject: RE: National Pride

Also, relying on a 3rd party web site to provide address information is really iffy at best. If you don’t pay for the service there is nobody to bitch at when its (and consequently your) web site goes down.

You have no control over a critical part of your page which is a big no-no.

Subject: RE: National Pride

I believe this would be ‘consuming a web service’ which LS can do. Give it a search.

Subject: National Pride

How about just putting the responsibility back on them?

Before presenting the form, give them a page that looks like one of those software license agreement oaths and require they accept it to continue to the form or cancel if they do not.

Subject: RE: National Pride

Yeah we have one of them, but it seems those pesky Eurasians/Eastasians want to completely disregard our ToS requirements to post spam.

Why kind of low-life agrees to Terms of Service statements and then blatantly disregards them by posting spam? I thought our ToS agreement page was a fool-proof deterent for spam posters from Eurasia and Eastasia.

I think it is deeply ungentlemanly to say “Yes I agree” then to abuse Anonymous-post forms to advertise ‘free ringtones!’

I never. I never thought the Internet could be host to such uncouth behaviour!

So, the original question stands: how do I prevent these foreign anonymous posters from posting (unless logged-in)?

@if(response = “Just prevent all anonymous posts”; @prompt(“No.”); “”)

Free ringtones for correct answers!!!*

*Non-redeemable outside of Oceania.

Subject: National Pride

If this is to avoid SPAM, what makes you think that only non-Oceanians SPAM???

In either case, you should definately make this a server-side check with some service that can give you the country code for a given IP address. Unfortunately, I can’t tell you how to achieve this.

/Peter

Subject: RE: National Pride

I don’t think that “only non-Oceanians spam”, but it would cut out a great deal (~99%) of the amount i’m getting. A blanket policy of “of anonymous submissions, only Oceanians may use this form” is ideally what i’m trying to get and basically fulfills my requirements.

I agree that a server-side solution is best, I just don’t have the faintest idea how to achieve this, however a post by Chris Fogerty, involving a call to an IP-location analysing web service, a bit further down seems pretty giddy-up.

If ANYONE has any idea, i’d love to hear it.