One problem with this (as I have found recently) is that there are four
***independent*** regional Internet registries. However, the American
(North) and sub-equatorial African registry (ARIN -
www.arin.net) does seem
to point you to which registry does contain the information, if they don't,
on a regular basis. This will require more parsing on your behalf.
The four registries are:
APNIC (
http://www.apnic.net/) - Asia (Pacific).
ARIN (
http://www.arin.net/) - North America, (part of) the Caribbean, and
sub-equatorial Africa.
LACNIC (
http://lacnit.net/) - Latin America and the Caribbean.
RIPE (
http://www.ripe.net/) - Europe, the Middle East, Central Asia, and
Africa.
I don't know if there is a central database (there probably isn't), but some
web-sites do query all of the registries. I knew one that would allow HTTP
GET requests, but it's disappeared from my browser history (?!?!).
Michael
--
M.Winter@(I_hate_spam)blueyonder.co.uk
Remove "(I_hate_spam)" to reply.
"Grant Wagner" <gwagner@agricoreunited.com> wrote in message
news:3F328FC6.B45861C9@agricoreunited.com...[color=blue]
> Amardeep Verma wrote:
>[color=green]
> > Hi,
> > I would like to determine the Country and Organization from a given
> > IP. I have to write a JSP, which when given the IP address gives the
> > country and the organization to which the IP belongs. The organization
> > may be the ISP, or a MNC or any other corporate/government body, or it
> > may be of an individual. I have to do it progamitically from inside a
> > JSP?
> > Any suggestions anybody
> >
> > Thanks in Advance for your reply[/color]
>
> Do a whois lookup, then parse the results that are returned. You could do
> something as simple as:
>
> <url:
http://ws.arin.net/cgi-bin/whois.pl?...nput=127.0.0.1 />
>
> then parse the HTML returned.
>
> Or find some service that allows SOAP calls, or a service that returns the
> data in an easier to parse format, such as XML or comma-delimited.
>
> --
> | Grant Wagner <gwagner@agricoreunited.com>
>[/color]