<head>
<title>alexa</title>
</head>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
</form>
<script language="javascript">
//每隔一定時間自動調用該頁面,此時該頁面用ajax隨機調用數據庫url,從而實現alexa刷新
//debugger;
var dt = alexa.GetUrl().value.Tables[0];
if (dt.Rows.length > 0)
{
window.location.href=dt.Rows[0].url;
}
</script>
</body>
</html>
原理:必須在你電腦上面安裝了alexa工具條,用IE訪問時纔可以被alexa統計到,否則是不會被統計到的,alexa主要統計的是IP和PV,同一IP在同一天內多次訪問同一頁面,將被統計一次,也就是PV是1,所以必須多IP,多PV纔可以提高排名。網上也有很多作弊的,推薦一些,如
http://autosurf.alexabooster.com/
http://www.menho.com/Index.Asp
http://www.azroo.com/
http://www.googlecn.cn/
http://alexa.baidui.com/
他們的優點是可以相互刷,帶來不同的IP,缺點是被刷的頁面太少,被刷到的機會太小,每天的PV很難有大的提高。
下面就結合上面的作弊工具和我提供的一些代碼,一起使用,來快速提高你的網站的alexa排名
第一步,首先下載安裝alexa工具條,如果已經安裝了,那跳過這一步即可。如果還沒有安裝,請下載安裝。安裝步驟可以參考 http://bbs.sooboo.com.cn/1619/ShowPost.aspx
第二步,確保alexa工具條是可以工作的,xp系統下有的時候alexa工具條不能正常顯示,解決辦法是安裝一個yahoo助手,然後在上網助手中,選擇“插件攔截”,打開後,在工具插件中,第一項就是“ALEXA工具條”,選擇它,然後在對話框底部,點“允許彈出”。如下圖
第三步,建立一個alexa.htm頁面,代碼如下
<head>
<title>alexa排名演示</title>
<script language="javascript">
var nInterval;
function chkRefresh()
{
win=window.open("alexa.aspx","mzs","");
nInterval=setInterval("go()",15000);
}
function go()
{
if(win.closed==true){chkStop();}else{
win.location="alexa.aspx";}
}
function chkStop()
{
window.clearInterval(nInterval);
win.close();
}
</script>
</head>
<body>
<input type='button' id='btn' style="width:60px" value="開始刷" onclick="chkRefresh();">
<input type="button" value="停止刷" name="btnStopRefresh" onclick="chkStop();">
</body>
</html>
第四步,建立一個alexa.aspx頁面,html代碼
<head>
<title>alexa</title>
</head>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
</form>
<script language="javascript">
//每隔一定時間自動調用該頁面,此時該頁面用ajax隨機調用數據庫url,從而實現alexa刷新
//debugger;
var dt = alexa.GetUrl().value.Tables[0];
if (dt.Rows.length > 0)
{
window.location.href=dt.Rows[0].url;
}
</script>
</body>
</html>
cs代碼
{
private void Page_Load(object sender, System.EventArgs e)
{
Utility.RegisterTypeForAjax(typeof(alexa));
}
[AjaxMethod()]
public DataSet GetUrl()
{
DataSet ds = new DataSet();
string strConnection = System.Configuration.ConfigurationSettings.AppSettings["ConnStr"];
SqlConnection conn = new SqlConnection(strConnection);
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "select top 1 * from alexa order by newid()";
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
conn.Close();
if(ds!=null)
{
return ds;
}
else
{
return null;
}
}
Web Form Designer generated codeWeb Form Designer generated code
}
第四步,可以用訪問目錄的方式,也可以用數據庫的方式來讀取url,我這裏是按數據庫的方式來演示的,建立一個表,結構如下
第五步,把你網站的所有頁面都錄入到數據庫,直接在查詢分析器中用insert語句,就不用錄入頁面了
第六步,最好動員全公司的人,讓大家一起設置ie默認頁爲alexa.htm,如http://www.cnblogs.com/alexa.htm ,然後點擊“開始刷”,不要把alexa.htm和alexa.aspx兩頁面關閉就可以了正常刷了。
drop table [dbo].[alexa]
GO
CREATE TABLE [dbo].[alexa] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[url] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO