Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to find my external IP

Reply
Thread Tools

how to find my external IP

 
 
nescafe
Guest
Posts: n/a
 
      03-26-2012
I need to develop one program which will:
- find my external IP address
- save this address into some string
- write this address into one file.


Any idea what should i use ( for first two options ) ?

Regards!
 
Reply With Quote
 
 
 
 
Daniel Pitts
Guest
Posts: n/a
 
      03-26-2012
On 3/26/12 5:23 AM, nescafe wrote:
> I need to develop one program which will:
> - find my external IP address
> - save this address into some string
> - write this address into one file.
>
>
> Any idea what should i use ( for first two options ) ?
>
> Regards!


Read:
http://www.whatismyip.com/faq/automation.asp

After reading this, the easiest thing to do is use the "curl" command
(for unix based OSes, including MacOS). You would curl the automation
URL (that is linked to from the above page) and redirect the output to
the file. Note, I'm not providing the direct link, because
whatismyip.com has specific TOS requirements.

The other perhaps more reliable but more difficult solution is to
"scrape" your routers admin pages. This works until you change routers,
or your router-firmware makes a change that isn't compatible with your
scraping. YMMV. whatismyip.com is fairly canonical.
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      03-27-2012
On 3/26/2012 8:23 AM, nescafe wrote:
> I need to develop one program which will:
> - find my external IP address
> - save this address into some string
> - write this address into one file.
>
>
> Any idea what should i use ( for first two options ) ?


To get the external IP address you need to ask a service
on the outside.

Such services exist, but you can also deploy your own
on some free/cheap server somewhere.

Arne

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-27-2012
On Mon, 26 Mar 2012 14:23:18 +0200, nescafe <> wrote, quoted
or indirectly quoted someone who said :

>I need to develop one program which will:
>- find my external IP address
>- save this address into some string
>- write this address into one file.


see http://mindprod.com/jgloss/ip.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
When you were a child, if you did your own experiment
to see if it was better to put to cocoa into your cup first
or the hot milk first, then you likely have the programmer gene..
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      05-06-2012
On 3/27/2012 12:14 AM, Roedy Green wrote:
> On Mon, 26 Mar 2012 14:23:18 +0200, nescafe<> wrote, quoted
> or indirectly quoted someone who said :
>
>> I need to develop one program which will:
>> - find my external IP address
>> - save this address into some string
>> - write this address into one file.

>
> see http://mindprod.com/jgloss/ip.html


Which does not really provide anything for external IP address ...

Arne

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
unresolved external symbol/using an external dll Scott Allen C++ 8 05-02-2004 06:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57