/// <summary> ///Get online numbers (51.la stats)/// </summary> /// <param name= "SiteID" >Site ID</param> stringTongji_51la (stringSiteID) {Httphelper http=NewHttphelper (); Httpitem Item=NewHttpitem () {URL="http://www.51.la/report/1_main_online.asp?id="+SiteID, Cookies="Ajstat_ok_pages=1; Ajstat_ok_times=1; Ajid=lookpass%5f16680845=8444135851201a0b86b68c66ac8eabb3", ContentType="application/x-www-form-urlencoded" }; Httpresult result=http. Gethtml (item); Match MC= Regex.match (result. Html"InnerHTML = ' (\\d+)"); returnMc. groups[1]. Value; } /// <summary> ///Get online numbers (CNZZ statistics)/// </summary> /// <param name= "SiteID" >Site ID</param> /// <param name= "PWS" >Standalone Password</param> /// <returns></returns> stringTONGJI_CNZZ (stringSiteIDstringPWS) { //Universal Frame ObjectHttphelper http =NewHttphelper (); //Get login Page CookieHttpitem item =NewHttpitem () {URL ="http://new.cnzz.com/v1/login.php?siteid="+SiteID}; Httpresult result=http. Gethtml (item); Cookies=Httphelper.getsmallcookie (result. Cookies); //Loginitem =NewHttpitem () {URL="http://new.cnzz.com/v1/login.php?t=login&siteid="+SiteID, Method="POST", PostData="password="+PWS, Cookie=Cookies, ContentType="application/x-www-form-urlencoded", AllowAutoRedirect=true, Autoredirectcookie=true }; Result=http. Gethtml (item); Cookies+=Httphelper.getsmallcookie (result. Cookies); //get 15 minutes of online IPitem =NewHttpitem () {URL="http://tongji.cnzz.com/main.php?c=flow&a=realtime&ajax=module=flash&type=Pie&siteid="+SiteID, Cookies=Cookies, ContentType="application/x-www-form-urlencoded" }; Result=http. Gethtml (item); Match MC= Regex.match (result. Html"total_ip\ ":(\\d+)"); returnMc. groups[1]. Value; }
Get online numbers cnzz and 51.la