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

Site Explorer API: Tracking Inbound Links

This C# example shows how to call the Yahoo! Site Explorer Web Service to get inbound links for a website.


// 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 URLs of pages that link to boingboing.net
int numRequested = 50;
int startPos = 1;
bool entireSite = true;
bool ok = siteExplorer.InboundLinks("boingboing.net",numRequested,startPos,entireSite);
if (ok)
{
    // Get the title, URL, and ClickURL of each inbound link.
    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:41 PM |

Feedback

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

Powered by: