Tuesday, April 30, 2013

Count google indexed page C#

To perform this task we need htmlagility pack click here and download

Count Google indexed page : -

public void getindexedcount(string url)
    {

        HtmlWeb hw = new HtmlWeb();
        HtmlDocument doc = hw.Load("https://www.google.co.in/search?hl=en&noj=1&q=site:" + url + "");
        foreach (HtmlNode link in doc.DocumentNode.SelectNodes("//div[@id='resultStats']"))
        {
            getindex.Text = "Indexes pages Count is :" + link.OuterHtml;
        }
    }

No comments:

Post a Comment