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);
}