Share My Creation Local IP Finder

This is a very simple application that displays the Local IP address.

I have tested it on Windows 7, Vista and it works well.

Hope this is useful for others.

Feedback always welcome. :)
 

Attachments

  • LocalIPv1.zip
    1.4 KB · Views: 691

magoandroid

Member
Licensed User
Longtime User
Hi Giga,
thanks for sharing, it works fine.

The picture with XP sp3 in Virtual Box.
MAgo
 

Attachments

  • LocalIP.PNG
    LocalIP.PNG
    55.6 KB · Views: 655

giga

Well-Known Member
Licensed User
Longtime User
Erel,

I know you have no control over this but is api.exip.org working any more or changed?

When I try to get the external IP I get Error:Forbidden.

So I changed it to the new one and now its working.

B4X:
'Does Not Work'
job.Download(http://api.exip.org/?call=ip)

'This One Works"
job.Download(http://api.externalip.net/?call=ip)

Thanks,
 

dilettante

Active Member
Licensed User
Longtime User
Lots of those sites will put you on a blacklist if you hit them too many times, i.e. too frequently.

In general a better solution would be to use the system UPnP libraries to detect and query your NAT router, but that would be platform-dependent and require a wrapper of some sort.

There do seem to be some UPnP libraries written in Java though. I just don't know anything about them. Here is one example:

Cling - Java/Android UPnP library and tools

However working with UPnP is going to be more complicated than just hitting a friendly HTTP site that will echo the source IP it sees.
 

tucano2000

Active Member
Licensed User
Longtime User
Erel,

I know you have no control over this but is api.exip.org working any more or changed?

When I try to get the external IP I get Error:Forbidden.

So I changed it to the new one and now its working.

B4X:
'Does Not Work'
job.Download(http://api.exip.org/?call=ip)

'This One Works"
job.Download(http://api.externalip.net/?call=ip)

Thanks,

No longer works. I changed the server address to work:

B4X:
Sub btnRemote_Action
    progress.Visible = True
    Dim job As HttpJob
    job.Initialize("exip", Me)
    job.Download("http://ip.telize.com/")
End Sub
 

giga

Well-Known Member
Licensed User
Longtime User
@tucano2000
Thanks for the update. This has happened with the server change at least once before. I am glad you got it to work. This is something that will have to be adjusted by anyone using "exip" for accessing the external IP. Relying on them not to change the address is what we hope for but if they do. It will be back to changing it again or going to another external IP service.
 
Top