[$type]
sys
[$websystype]
get_shoulus
[$lastupdate]
2011-05-05
[$code]


 //--------------------------------------------------------------------


  public string get_yahoo_wailian(string rooturl){


  
   GetRemoteObj pw=new GetRemoteObj();

   string outc;
  string urlstr="http://sitemap.cn.yahoo.com/search?p=http%3A%2F%2F"+rooturl+"&bwm=i";
   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


  
                  //msgboxa(rt);


            System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("õַҳ.{1,3}.{1,2}\\<STRONG\\>(?<num>.*?)\\</STRONG\\>", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);


            System.Text.RegularExpressions.Match rtmh = reg1.Match(rt);

            if (rtmh.Success)
            {


                return rtmh.Groups["num"].Value.Replace(",", "");


            }else{
              return "0";//Ҳվʱ

         }




  }

 //--------------------------------------------------------------------


  public string get_baidu_shou(string rooturl){


  
   GetRemoteObj pw=new GetRemoteObj();

   string outc;
  string urlstr="http://www.baidu.com/s?wd=site%3A"+rooturl;
   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


  
                  //msgboxa(rt);


            System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("\\>ҵؽԼ{0,1}(?<num>.*?)\\<", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);


            System.Text.RegularExpressions.Match rtmh = reg1.Match(rt);

            if (rtmh.Success)
            {


                return rtmh.Groups["num"].Value.Replace(",", "");


            }else{
              return "0";//Ҳվʱ

         }




  }

 //--------------------------------------------------------------------

  public string get_baidu_kuaizhao(string rooturl){


  
   GetRemoteObj pw=new GetRemoteObj();

   string outc;
  string urlstr="http://www.baidu.com/s?wd="+rooturl;
   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


  
                 //msgboxa(XGM.lib.comm.Input.LostHTML(rt));


           // System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("\\<BR\\>\\<SPAN class=g\\>"+rooturl.Replace(".","\\.")+".? (?<day>\\d{4}\\-\\d{1,2}\\-\\d{1,2}) \\</SPAN\\>", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);
            
             System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("\\>\\<B\\>"+rooturl.Replace(".","\\.")+"\\</B\\>.? (?<day>\\d{4}\\-\\d{1,2}\\-\\d{1,2})", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);

            System.Text.RegularExpressions.Match rtmh = reg1.Match(rt);

            if (rtmh.Success)
            {


                return rtmh.Groups["day"].Value;


            }else{
              return "ҳ";//Ҳվʱ

         }




  }






 //--------------------------------------------------------------------

  public string get_baidu_isindex(string webname,string rooturl){


  

  webname = System.Web.HttpUtility.UrlEncode(webname, System.Text.Encoding.GetEncoding("utf-8"));

   GetRemoteObj pw=new GetRemoteObj();

   string outc;
//  string urlstr="http://www.baidu.com/s?wd="+webname;

 string urlstr="http://www.baidu.com/s?wd=site%3A"+rooturl;


   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


    

            string[][] hrefsarr = pw.zzj_GetHref_and_hreftext(rt);

             for(int i=0;i<hrefsarr.Length;i++){

         if(hrefsarr[i][0].Trim().ToLower().IndexOf(rooturl)!=-1){

            return "1";
              }


      }

 return "0";


  }





 //--------------------------------------------------------------------


  public string get_google_soulu(string rooturl){


  
   GetRemoteObj pw=new GetRemoteObj();

   string outc;
  string urlstr="http://www.google.com.hk/search?hl=zh-CN&source=hp&q=site%3A"+rooturl+"&meta=&aq=f&aqi=&aql=&oq=";
   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


  
                  //msgboxa(rt);


            System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("\\>ҵԼ(?<num>.*?)\\<", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);


            System.Text.RegularExpressions.Match rtmh = reg1.Match(rt);

            if (rtmh.Success)
            {


                return rtmh.Groups["num"].Value.Replace(",", "").Replace(" ", "");


            }else{
              return "0";//Ҳվʱ

         }




  }



 //--------------------------------------------------------------------


  public string get_sogou_soulu(string rooturl){


  
   GetRemoteObj pw=new GetRemoteObj();

   string outc;
  string urlstr="http://www.sogou.com/web?query=site%3A"+rooturl+"";
   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


  
                  //msgboxa(rt);


            System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("ҵԼ{0,1}(?<num>.*?)", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);


            System.Text.RegularExpressions.Match rtmh = reg1.Match(rt);

            if (rtmh.Success)
            {


                return XGM.lib.comm.Input.LostHTML(rtmh.Groups["num"].Value.Replace(",", "").Replace(" ", ""));


            }else{
              return "0";//Ҳվʱ

         }




  }



 //--------------------------------------------------------------------


  public string get_soso_soulu(string rooturl){


  
   GetRemoteObj pw=new GetRemoteObj();

   string outc;
  string urlstr="http://www.soso.com/q?pid=s.idx&w=site%3A"+rooturl.Replace("www.","");//?
   string rt=pw.GetRemoteHtmlCode(urlstr,"","get","",out outc );


  
                  //msgboxa(rt);


            System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("Լ(?<num>.*?)ʱ", System.Text.RegularExpressions.RegexOptions.Multiline|System.Text.RegularExpressions.RegexOptions.IgnoreCase);


            System.Text.RegularExpressions.Match rtmh = reg1.Match(rt);

            if (rtmh.Success)
            {


                return rtmh.Groups["num"].Value.Replace(",", "").Replace(" ", "");


            }else{
              return "0";//Ҳվʱ

         }




  }





  

