Blogging and News Syndication Software

Blogger API, RSS API, Atom API, and more.
posts - 17, comments - 14, trackbacks - 26

My Links

News

Tortuga Components / Software Tools Home

See Also: Chilkat Software

Article Categories

Archives

Post Categories

Recommended

Yahoo! Site Explorer .NET Class Library

Tortuga has a free .NET class library for the Yahoo! Site Explorer Web Service. This is a C# example for fetching the 1st 50 pages of a site that are in the Yahoo! index.


    // Create an instance of the Tortuga .NET Site Explorer component for Yahoo!
    Tortuga.Yxplore siteExplorer = new Tortuga.Yxplore();
    
    // Set your Yahoo Site Explorer App ID
    siteExplorer.AppId = "myAppID";
    
    // Get the first 50 pages of boingboing.net that are in the Yahoo! index:
    int numRequested = 50;
    int startPos = 1;
    bool entireSite = true;
    bool ok = siteExplorer.PageData("boingboing.net",numRequested,startPos,entireSite);
    if (ok)
    {
	// Get the title, URL, and ClickURL of each page in the Yahoo! index.
	int i;
	int numResults = siteExplorer.TotalResultsReturned;
	for (i=0; i<numResults; i++)
	{
	    string title = siteExplorer.GetTitle(i);
	    string url = siteExplorer.GetUrl(i);
	    string clickUrl = siteExplorer.GetClickUrl(i);
	    
	    listBox1.Items.Add(title);
	    listBox1.Items.Add(url);
	    listBox1.Items.Add(clickUrl);
	    listBox1.Items.Add("-");
	}
    }
    else
    {
	MessageBox.Show(siteExplorer.LastResponse);
	}

Print | posted on Friday, September 30, 2005 8:30 PM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: