原來(lái)ghost自動(dòng)主機(jī)的戰(zhàn)績(jī)網(wǎng)站系統(tǒng),大部分?jǐn)?shù)據(jù)通過(guò)ghost自動(dòng)存儲(chǔ)原始數(shù)據(jù)實(shí)時(shí)計(jì)算出來(lái),當(dāng)游戲局?jǐn)?shù)和玩家人數(shù)越來(lái)越多時(shí),其顯示的效率極大降低,有的頁(yè)面打開(kāi)數(shù)據(jù)需要1-2分鐘,甚至打不過(guò)(超過(guò)php腳本語(yǔ)言執(zhí)行的最長(zhǎng)時(shí)間),本人增加一個(gè)后臺(tái)積分計(jì)算程序,統(tǒng)計(jì)所有信息存儲(chǔ)在數(shù)據(jù)表中,并修改php代碼直接從數(shù)據(jù)庫(kù)讀出相關(guān)的游戲信息顯示,無(wú)需要復(fù)雜的計(jì)算,此外本人增加了一些額外的功能(戰(zhàn)網(wǎng)注冊(cè)、找回密碼以及搜索),更新了英雄信息(dota 6.70)、以及系統(tǒng)的漢化。
下面先看一下我戰(zhàn)績(jī)系統(tǒng)的顯示頁(yè)面








好了,圖片就先這些嗎,php源代碼在本人修改dota戰(zhàn)績(jī)系統(tǒng)
1.極大優(yōu)化速度(原系統(tǒng)當(dāng)個(gè)人游戲超過(guò)200局,基本顯示不了),主要通過(guò)增加數(shù)據(jù)表計(jì)算各種積分,統(tǒng)計(jì)信息存儲(chǔ)在數(shù)據(jù)表(必須使用附帶的積分計(jì)算程序 ./score_5/update_dota_elo_5.exe,簡(jiǎn)單配置 )
2.增加戰(zhàn)網(wǎng)網(wǎng)頁(yè)注冊(cè)、戰(zhàn)網(wǎng)網(wǎng)頁(yè)找回密碼以及搜索功能。
3.增加封禁顯示
4.漢化了本戰(zhàn)績(jī)系統(tǒng)
積分計(jì)算程序配置及運(yùn)行
1.修改update_dota_elo.cfg
主要ghonst數(shù)據(jù)庫(kù)
db_mysql_server = 219.224.167.151 //your mysql server ip
db_mysql_database = ghostone//ghost db name
db_mysql_user = root
db_mysql_password = yourpassword
db_mysql_port = 3306
2.運(yùn)行update_dota_elo_5.exe
該程序每5分鐘計(jì)算一次積分
(積分計(jì)算程序的源代碼見(jiàn)http://cid-4b5bdf2f7fd33dee.office.live.com/self.aspx/pvpgn/scores%5E_src.rar)
戰(zhàn)績(jī)系統(tǒng)配置使用說(shuō)明
1.在mysql中執(zhí)行./pvpgn.sql,./ghost.sql,.hero.sql腳本
pvpgn.sql主要是戰(zhàn)網(wǎng)使用的數(shù)據(jù)表
ghost.sql主要ghost 自動(dòng)主機(jī)dota戰(zhàn)績(jī)的數(shù)據(jù)表
hero.sql為漢化的英雄描述,技能等數(shù)據(jù)表(包含數(shù)據(jù),更新到6.70)
2. 修改./config.php,
//MySQL Database Connection information (Optional):
//Must correspond to the settings in your MySQL Database.
//自動(dòng)主機(jī)的數(shù)據(jù)庫(kù)配置
$host = '219.224.167.151';
$username = 'root';
$password = 'yourpassword';
$databasename = 'ghostone';//your db name
$dbhost = "219.224.167.151"; // MySQL Database Hostname
$dbname = "pvpgn"; // MySQL Database Name
$dbuser = "root"; // MySQL Username
$dbpass = "your password"; // MySQL Password
$activation['url'] = "將war3.buaabt.cn換成你的主機(jī)ip,或者你的域名
3.修改./bnreg/activation.php 中的function email_activation($data,$activation,$lang,$dbh)方法(使用該郵箱給注冊(cè)用戶發(fā)送激活email)
(1)255行
$rg_email="buaa.edu.cn";//改成你希望通過(guò)驗(yàn)證的郵箱結(jié)尾,本例中只有buaa.edu.cn結(jié)尾的郵箱能通過(guò)驗(yàn)證,其它則不能注冊(cè)
(2)337行
$email_content="Thans"."\40"."for\40your\40registration\n";
$email_content.="Your account is ".$data['acct_username']."\n";
$email_content.="To\40complete\40your\40registration,\40please\40visit\40this\40URL:\n";
$email_content.=$activation['url'] . "?action=activate&x=".$data['webacct_activation_code'];
$email_content.="\nIf\40you\40have\40any\40problem,\40Do\40not\40hesitate\40to\40contact\40me.\40\nQQ:370180103\40\nEmail:kuramawzw@163.com";
這段為激活郵件的內(nèi)容,可修改,但$activation['url'] . "?action=activate&x=".$data['webacct_activation_code'];這行內(nèi)容不能修改.
郵件的模版:(中文亂碼問(wèn)題沒(méi)能解決,建議還是用英文)
Your account is test
To complete your registration, please visit this URL:
http://war3.buaabt.cn/activate.php?action=activate&x=c93765cb39dcbd74a9df06db0053a3ee
If you have any problem, Do not hesitate to contact me.
QQ:370180103
Email:kuramawzw@163.com。
(3) 345行
$smtp=new smtp_mail("202.112.128.68","25","kuramawzw@cse.buaa.edu.cn","your password",false);
發(fā)送激活郵件的源地址:2020.112.128.68為你郵箱的服務(wù)器地址,若你使用別的郵箱,以163.com為例,
$smtp = new smtp_mail("smtp.163.com","25","你的163.com的帳號(hào)","你的密碼",false);
用戶名和密碼要正確,激活郵件都由該郵箱發(fā)出。
4 修改./bnreg/activation.php 中的function post_chapass($username,$dbh)方法,用于用戶忘記密碼時(shí)通過(guò)郵箱找回密碼
(1)168行
$rg_email="buaa.edu.cn";//改成希望接受的郵箱后綴
(2)220行
$email_content="";
$email_content.="Your account is ".$username."\n";
$email_content.="To\40chang\40your\40password,\40please\40visit\40this\40URL:\n";
//echo "chpass url:".$chpass_url."<br>";
//echo "activation url:".$activation['url'];
$chpass_url="將war3.buaabt.cn改成你的主機(jī)ip或域名
$email_content.=$chpass_url."&u=".$username."&x=".$code."\n";
$email_content.="\nIf\40you\40have\40any\40problem,\40Do\40not\40hesitate\40to\40contact\40me.\40\nQQ:370180103\40\nEmail:kuramawzw@163.com";
$smtp=new smtp_mail("smtp.163.com","25","kuramawzw@163.com","your password",false);//修改為你的密碼
$smtp->send("kuramawzw@cse.buaa.edu.cn",$email,"Buaa BN Chang Password",$email_content);
如有問(wèn)題請(qǐng)聯(lián)系kuramawzw@163.com,謝謝.