[已解决问题] 谁懂PHP,又懂.NET的?
提问时间: 2008-03-12 10:34
浏览:344 次

这是一段PHP能够迅速提高 Alexa 排名的代码,谁能给帮忙翻译下?给.NET做网站的朋友一起共享。

QQ:82697180 MSN:LISHUNHU@MSN.COM

<?
//[ARC] Alexa Rank Cheater
//
//Author: Stephen Hill - admin@onlinehoster.com - http://www.onlinehoster.com
//
//Date: 14th December 2005
//
//Description:
//Increases your Alexa ranking by hitting your website through proxy servers
//and emulating the use of the alexa toolbar. Alexa service thinks your
//site is suddenly alot more popular and your rank goes up. Simple
//
//How-to:
//Fill proxies.txt with as many proxy servers as you can. They should
//be formatted as IP:PORT with one per line. E.g 10.0.0.1:8080
//
//Upload this file and proxies.txt to your webserver, visit this page
//enter your url in the format of http://www.yourdomain.com and click GO.
?>


<?
@set_time_limit(0);
echo "<title>[ARC] Alexa Rank Cheater</title>
<style type='text/css'>
body {
background-color: black;
font-family: verdana;
color: white;
}

table {
border: 10px dotted white;
border-width: 1px
}

</style>
";

if(!$site){
echo "
<br /><br />
<center>
<table>
<form method='post' action='index.php'>
<tr>
<td>website:<input type='text' name='site' value='http://www.onlinehoster.com'></td>
</tr>
<tr>
<td align='right'><input type='submit' value='GO'></td>
</tr>
</table>
</center>
";
}

if($site){
$alexaurl = "http://209.237.237.101/data/Ae7E31+kj740Ee?cli=10&dat=snba&ver=7.0&url=$site";
$rank = file_get_contents($alexaurl);
preg_match_all("/REACH RANK=(.+?)\/>/is", $rank, $result);
$rank = $result[1];
foreach($rank as $rank){
$rank = str_replace("\"", "", $rank);
}

echo "Current rank for $site: $rank<br /><br />";

$handle = @fopen("proxies.txt", "r");
if ($handle) {
   while (!feof($handle)) {
       $buffer = fgets($handle, 4096);
$data = explode(":", $buffer);
$ip = $data[0];
$port = $data[1];
if($ip){
echo "Connecting to $ip on port $port...";
flush();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$alexaurl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT,5); //set timeout to 2 so we dont get stuck on dead proxies
curl_setopt($ch, CURLOPT_PROXY, "$ip:$port");
$result = curl_exec($ch);
if(!$result){
echo "<font color='red'>failed</font><br />";
flush();
}else{
ec

提问者:李顺虎 - 初学一级

问题补充:居然有字数限制,没有贴完
下载地址:http://onlinehoster.com/blog/wp-content/uploads/2006/09/alexa-rank-cheater1.zip

所有回答(4)
有个人,神!!
4个月前   回答者:xiaohc - 初学一级
......
Alexa排名不是几行代码就能左右地...

4个月前   回答者:被偷De贼 - 菜鸟二级
有没有哪段代码能提升百度/Google排名的?
4个月前   回答者:deerchao - 大侠五级
一个HttpWebRequest 的简单应用,每次访问(GET)之前别忘记切换代理。

HttpWebRequest loHttp = (HttpWebRequest) WebRequest.Create(“http://209.237.237.101/data/Ae7E31+kj740Ee?cli=10&dat=snba&ver=7.0&url=http://blog.rubypdf.com”);
loHttp.Proxy = new WebProxy("192.168.1.1", 8080);
loHttp.Method = "GET";
// *** Set any header related and operational properties
loHttp.Timeout = 5000;  // 5 secs
//这个参考IE或者FireFox所使用的吧,这里懒得贴了。
loHttp.UserAgent = "Code Sample Web Client";
// *** Return the Response data
HttpWebResponse loWebResponse = (HttpWebResponse) loHttp.GetResponse();
//下面自己看着处理输出吧
4个月前   回答者:RubyPDF - 菜鸟二级
评论
   您需要登录以后才能回答!
我的问题    我要提问


快到期问题

> 问题排行榜

有不合适内容,建议去除