C# Get
设置网页数据更新为默认开始
通过网页设置开启,
通过NET可以实时抓取数据
----------------------------------
调试成功:
/////开启数据更新
easy.SetOpt(CURLoption.CURLOPT_URL, "http://192.168.2.50/variables/write.php");
easy.SetOpt(CURLoption.CURLOPT_POSTFIELDS, "cmd=1");
/////开启数据更新
easy.SetOpt(CURLoption.CURLOPT_URL, "http://192.168.2.50/variables/write.php");
easy.SetOpt(CURLoption.CURLOPT_POSTFIELDS, "cmd=0");
/////获取实时数据
easy.SetOpt(CURLoption.CURLOPT_URL, "http://192.168.2.50/variables/mnt/symbols");
//设定主机箱压力为500Kpa
easy.SetOpt(CURLoption.CURLOPT_URL, "http://192.168.2.50/variables/write.php");
easy.SetOpt(CURLoption.CURLOPT_POSTFIELDS, "set=.Main_Pression_Set%3AINT%3D0%3B&cmd=3");
//设定主机箱压力为0Kpa
easy.SetOpt(CURLoption.CURLOPT_URL, "http://192.168.2.50/variables/write.php");
easy.SetOpt(CURLoption.CURLOPT_POSTFIELDS, "set=.Main_Pression_Set%3AINT%3D5000%3B&cmd=3");
-----------------------------------------------
参考文献:
C#能使用curl吗?:
http://zhidao.baidu.com/link?url=KGntLhlhAQonyxEMOXWA-lguWqkeaD6JE2mDTIs5AmotCGTaAZOW5FhJUY7TumGCbHdeqA1F3juqdhqkPdueZ_库地址:
http://sourceforge.net/projects/libcurl-net/?source=dlphttp://www.cnblogs.com/lidabo/p/4583067.html