User talk:Webcosmo

YAHOO Site Explorer Inbound Links ASP SCRIPT Track inbound links at Yahoo, Discover how many pages link to your website Yahoo developers network has the script written on PHP. I just developed the code to work on ASP. You can read more about the Yahoo Site Explorer Inbound Links at.

Terms of use: This script is written by webcosmo.com and you can use this script for personal as well as distribution.

Instructions:

=
- Get the Yahoo API Key from developer.yahoo.com/wsregapp/index.php -. Copy the script below, paste it on a text editor e.g. Notepad or Textpad. - Change the appId with the Yahoo Api Key you got. - Save the file named as "LinkTrackerByWebCosmo.aspx" or your choice. Please note here that, the extension of the file is .aspx. - Upload the file on your server.

=
START OF Script (Change the appId and domain variable below with your own=========

<%@ Language=C# %> <%@Import namespace= 'System.Net' %> <%@Import namespace= 'System.Xml' %>   private void Page_Load(object sender, System.EventArgs e) { XmlTextReader reader=null; try {

//Change the appId variable(marked with *s below) with yours

String appId="**************************************";

if(Request.QueryString["url"]==null || Request.QueryString["url"].ToString.Trim=="") { Response.Write("0"); return; } String url=Request.QueryString["url"].ToString;

String request="http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid="+appId+"&query="+url+"&output=string: xml&omit_inlinks=domain";

reader=new XmlTextReader(request); reader.WhitespaceHandling = WhitespaceHandling.None;

while(reader.Read) { if(reader.NodeType==XmlNodeType.Element) { if(reader.Name.ToLower=="resultset") { Response.Write(reader.GetAttribute("totalResultsAvailable")); break; } } } } catch(Exception ex) { Response.Write("0"); } finally { if (reader!=null) reader.Close; } }  

=
=END OF SCRIPT=================