Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating Attributes At Run Time Pin
Mike Ellison4-Nov-03 2:51
Mike Ellison4-Nov-03 2:51 
GeneralRe: Creating Attributes At Run Time Pin
Heath Stewart4-Nov-03 3:00
protectorHeath Stewart4-Nov-03 3:00 
GeneralRe: Creating Attributes At Run Time Pin
Mike Ellison4-Nov-03 6:20
Mike Ellison4-Nov-03 6:20 
GeneralRe: Creating Attributes At Run Time Pin
Markyg4-Nov-03 10:34
Markyg4-Nov-03 10:34 
GeneralRe: Creating Attributes At Run Time Pin
Roger Alsing4-Nov-03 3:52
Roger Alsing4-Nov-03 3:52 
GeneralWAN IP address Pin
marnicola3-Nov-03 13:10
marnicola3-Nov-03 13:10 
GeneralRe: WAN IP address Pin
Heath Stewart4-Nov-03 2:53
protectorHeath Stewart4-Nov-03 2:53 
GeneralRe: WAN IP address Pin
martiwy4-Nov-03 20:30
martiwy4-Nov-03 20:30 
Hi I am trying to do the same. As someone suggested me to use a feature in my linksys router but mine doesn't have it. Anyway, there are several ways but I did:

1. Create a simple html page which records(using script php, java, asp..) client IP and display it on the page. This page will be hosted somewhere outside your linksys router. example: http://www.somedomain.com/ip.html which will display string IP=111.112.114.115. Your code will go to that page and grab the text and parse for IP.

and Here is the code in C#

Regex regexp = new Regex("IP=[0-9]+.[0-9]+.[0-9]+.[0-9]+");
WebRequest request = WebRequest.Create("http://www.somedomain.com/ip.html");
WebResponse response = request.GetResponse();
StreamReader rd = new StreamReader(response.GetResponseStream());
string content = rd.ReadToEnd();
string myip = regexp.Match(content).ToString();
then you can split the string and get IP only.


2. The second way is to login your linksys router and go to http://192.168.1.1/status.htm
and then seach for wan IP but I still have problem with the login.
GeneralRe: WAN IP address Pin
marnicola5-Nov-03 12:02
marnicola5-Nov-03 12:02 
GeneralRe: WAN IP address Pin
martiwy6-Nov-03 7:05
martiwy6-Nov-03 7:05 
GeneralRe: WAN IP address Pin
marnicola9-Nov-03 16:47
marnicola9-Nov-03 16:47 
Generalproblem Pin
bora3ee3-Nov-03 12:54
bora3ee3-Nov-03 12:54 
GeneralRe: problem Pin
Divyesh Virani3-Nov-03 19:39
Divyesh Virani3-Nov-03 19:39 
GeneralZ Buffer question in D3d 9 Pin
Arturo Mayorga3-Nov-03 12:09
Arturo Mayorga3-Nov-03 12:09 
GeneralRe: Z Buffer question in D3d 9 Pin
Kentamanos3-Nov-03 12:25
Kentamanos3-Nov-03 12:25 
GeneralRe: Z Buffer question in D3d 9 Pin
Heath Stewart4-Nov-03 3:09
protectorHeath Stewart4-Nov-03 3:09 
Generalusing variable declared in another class [NEWBIE] Pin
Paolo Ponzano3-Nov-03 8:57
Paolo Ponzano3-Nov-03 8:57 
GeneralRe: using variable declared in another class [NEWBIE] Pin
Alvaro Mendez3-Nov-03 9:04
Alvaro Mendez3-Nov-03 9:04 
GeneralConfused about Resources Pin
Alvaro Mendez3-Nov-03 8:28
Alvaro Mendez3-Nov-03 8:28 
GeneralRe: Confused about Resources Pin
scott373-Nov-03 12:44
scott373-Nov-03 12:44 
GeneralRe: Confused about Resources Pin
Alvaro Mendez3-Nov-03 17:03
Alvaro Mendez3-Nov-03 17:03 
GeneralEmbedding window in window Pin
CBoland3-Nov-03 8:21
CBoland3-Nov-03 8:21 
GeneralRe: Embedding window in window Pin
Douglas Troy4-Nov-03 6:37
Douglas Troy4-Nov-03 6:37 
GeneralObject Array in CompactFramework Pin
marcoscres3-Nov-03 6:40
marcoscres3-Nov-03 6:40 
GeneralHashtable as datasource Pin
Rob STS3-Nov-03 5:38
Rob STS3-Nov-03 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.