c# asp.net获取Alexa排名数据
来源:互联网 发布:网络童星传媒公司 编辑:程序博客网 时间:2024/05/21 06:15
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Net;
using System.IO;
namespace BLL
{
public class Alexa
{
public static int GetAlexa(string host)
{
string html = Net.GetHtml("http://data.alexa.com/data/?cli=10&dat=snba&ver=7.0&url=" + host);
try
{
XmlDocument xml = new XmlDocument();
xml.LoadXml(html);
XmlNode node = xml.SelectSingleNode("/ALEXA/SD/POPULARITY");
if (node != null && node.Attributes["TEXT"] != null)
return int.Parse(node.Attributes["TEXT"].Value);
}
catch
{
int a = html.IndexOf("RANK=/"");
if (a > 0)
{
int b = html.IndexOf("/"", a+6);
if (b>0)
return int.Parse(html.Substring(a+6, b-a-6));
}
}
return 0;
}
}
}
- c# asp.net获取Alexa排名数据
- ASP获取ALEXA排名的算法
- php 获取alexa排名
- 如何通过编程方式获取alexa排名的数据
- Alexa详细排名数据完成
- alexa排名有数据了
- PHP 编程获取网站的 Alexa 排名
- 如何将两个域名合并到一个alexa排名数据
- asp.net获取远程数据
- alexa 排名查询 webservice
- Alexa的排名机制
- 如何提高alexa排名
- 什么是ALEXA排名
- Alexa网站排名
- 关于Alexa排名
- 如何提高Alexa排名
- Alexa排名的常识
- Alexa网站排名
- C++里面有没有获取单个进程的CPU利用率和内存利用率的函数啊?
- 原创:注入式广告管理实现(javacript)
- Access 时间段查询
- What are the difference between DDL, DML and DCL commands?
- Thinkpad SL-400 XP驱动下载与安装方法
- c# asp.net获取Alexa排名数据
- 资源管理器默认打开指定盘
- struts2学习中遇到的一些问题
- c# asp.net获取google pr值源代码
- 用.net编写站内短信群发软件
- c# asp.net获取域名whois信息
- asp.net实现手机号码归属地查询
- 事务
- 终于