473,569 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get external (public) IP from my Linksys router

I've been searching for a way to programtically get my public IP from my
router. After much research th eonly thing I came up with was going to a
site like privacy.net and returning the value it reads. What I'd like to do
is compile this into my .chm I give my remote users. So ideally they would
have a button to press that goes to the web site reads the site and returns
the ip to a text box.

I'd like to do it without the user actually seeing IE open the web site. Any
leads?
Jul 17 '05 #1
2 10057
try www.whatismyip.com

"Yogi_Bear_ 79" <IT*****@spamfr ee.com> wrote in message
news:jb******** ************@co mcast.com...
I've been searching for a way to programtically get my public IP from my
router. After much research th eonly thing I came up with was going to a
site like privacy.net and returning the value it reads. What I'd like to
do
is compile this into my .chm I give my remote users. So ideally they would
have a button to press that goes to the web site reads the site and
returns
the ip to a text box.

I'd like to do it without the user actually seeing IE open the web site.
Any
leads?

Jul 17 '05 #2
""Yogi_Bear _79" <IT*****@spamfr ee.com>" wrote in comp.lang.java:
I've been searching for a way to programtically get my public IP from my
router. After much research th eonly thing I came up with was going to a
site like privacy.net and returning the value it reads. What I'd like
to do is compile this into my .chm I give my remote users. So ideally
they would have a button to press that goes to the web site reads the
site and returns the ip to a text box.

I'd like to do it without the user actually seeing IE open the web site.
Any leads?


For starters, don't use IE. Opera and Mozilla are both excellent
alternatives that include many useful features without all the security risks
(have you noticed how many security updates Microsoft has released for
Internet Explorer over the years?).

I'll assume you're writing Java code (otherwise why else would you post
your question here?), and that your .CHM has a Java Applet embedded or is
causing a Java Application or Java Servlet to start which returns the IP as a
result.

The easy way to read a web page is to use the Java HTTP Component, for
which some simple documentation can be found here:

Java HTTP Component
http://www.jscape.com/inetfactory/http.html

For more information about HTTP (which I assume you don't need, but
perhaps other readers may find it helpful), visit this web page:

CGI tutor
http://www.mindprod.com/projects/cgitutor.html

--
Randolf Richardson, pro-active spam fighter - rr@8x.ca
Vancouver, British Columbia, Canada

Sending eMail to other SMTP servers is a privilege.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3813
by: Brad Tilley | last post by:
Probably a stupid question, but here goes: Is there any way to get a scaled down version of Python onto a Linksys Wireless router? Are there any projects out there that are doing this? I've googled around a bit, but didn't find much. I want to keep the router's software as it is, but I also would like to have some scripting abilities on it...
5
3169
by: Chris Fink | last post by:
Help....I am trying to use the System.net namespace to determine the Internet (WAN) IP Address of my computer. No luck finding any such class so far. Any ideas?
1
15161
by: Lorne Smith | last post by:
Hi, I'm running a small network and need to get the external IP address of my router so that I can update my DNS forwarding service should my IP change (it's a dynamic one)... I can get the IP addresses of all the machines in the network, and can get the internal IP address of the default gateway (the router), but I need to get the external...
3
2071
by: mscdex | last post by:
I have a test application that transfers files from a client to a server. I've been locally testing this on my local LAN and it has been working fine. However, when I try to transfer a file over the internet (with the port opened up in the router, no firewalls), it never connects. I'm thinking it is due to the TcpListener only binding to my...
1
9446
by: danknauf | last post by:
I have a webserver which is behaving strangely. The server is a fresh copy of Windows 2003 running IIS with default options + Active Server Pages installed. The server is connected to a Linksys router, and has a static IP address of 192.168.1.10. When I access a page with the following script directly from the server, my WAN IP address is...
1
3712
by: pugvette | last post by:
I have a linksys w/speed booster router. on a computer w/ XP. a laptop w/xp and we just bought a new tower that has vista. we have a belkiin adapter hooked up to new vista. i'm trying to connect to my existing network. i turned off vista firewall. i have a secure connection. i know the security code. but i'm lost on this set up. i tried the...
4
7745
by: kimiraikkonen | last post by:
Hi, I'm connected through router and i have a local ip address as well starting with 192.168.x.x. However i can read local ip address fine with that code: Dim strHostName As String Dim strIPAddress As String strHostName = System.Net.Dns.GetHostName() strIPAddress = System.Net.Dns.Resolve(strHostName).AddressList(0).ToString()
1
6237
by: ghe | last post by:
Good day, I have this DSL connection which has a dynamic IP address, then I have a new Linksys router(wired), and I had set-up my linksys router through it's web-based “Setup” utility, I had use the MAC Address Cloning feature of the router and then restarted the DSL Modem, the Linksys router and my PC, but then I can't still connect to the...
1
2957
by: cleary1981 | last post by:
Hi, I have set up a VPN router which I can access from anywhere except from my office. The VPN router I am connecting to is a Draytek router. My office network connects to the internet through a Cisco 800series VPN router. Is there any extra steps I need to take to access it? I am just using the windows VPN setup to connect.
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.