路由自动获取公网的IP

代码
   
     
public static void reconnect()
{
string url = " http://192.168.1.1/userRpm/StatusRpm.htm?Connect=连 接&wan=1 " ;
HttpWebRequest req
= WebRequest.Create(url) as HttpWebRequest;
req.PreAuthenticate
= true ;
NetworkCredential netCreden
= new NetworkCredential( " admin " , " poiuytrewq " );
req.Credentials
= netCreden;
req.GetResponse();
}

 

你可能感兴趣的:(IP)