all
a
/
b
/
c
/
f
/
h
/
j
/
jp
/
l
/
o
/
q
/
s
/
sw
/
lounge
cgi
up
wiki
Heyuri!
Bulletin Boards
2D Cute
2D Ero
2D Lolikon
3D Girls
Anime/Manga
Flash
Girl Talk
日本語/Japan
Lounge
Oekaki
Off-Topic
Site Discussion
Strange World
Overboard
Heyuri★CGI
Heyuri★CGI
@PartyII
Battle Royale R
Chat
Chinsouki★
Dating
DevChat
Drama Club
Hakoniwa Islands PvE
Hakoniwa Islands PvP
Polls
Slime Breeder
Web Banana
Web Shiritori
Yumemiru Gambler
Kakiko Checker
Other
Anime Nominations
Banners
Cytube
Heyuri Calendar
Heyuri Wiki
MAL Club
Museum
Steam Group
Uploader
[
Settings
]
[
Home
] [
Contact
] [
Catalog
] [
Search
] [
Thread list
] [
Stats
] [
Reports
] [
Watcher
] [
PMs
] [
Banners
] [
Admin
]
Submit board banners here.
Site Discussion@Heyuri
it's the place to be!
[
Return
]
Report a post
Preview
Anonymous!!Xq/XOWxrk0
2024/03/30(Sat)23:28:59 ID:FOnWnfVs
No.
66462
[
Edit
]
[
Report
]
[
Edit
] [
Report
]
▶
oh i didn't notice it was in utilities. that place just seemed like some sort of extra that was not used in main script.
now i am thinking it is hidden to just collect the ip and log it for 24 hours
<?php
/*
Online counter for kokonotsuba
from
http://php.loglog.jp/
*/
define(USR_LST, "../dat/users.dat");
define(TIMEOUT, 300); // Update every 5 minutes
$usr_arr = file(USR_LST);
touch(USR_LST);
$fp = fopen(USR_LST, "w");
$now = time();
$addr = $_SERVER['REMOTE_ADDR'];
for ($i = 0; $i < sizeof($usr_arr); $i++) {
list($ip_addr,$stamp) = explode("|", $usr_arr[$i]);
if (($now - $stamp) < TIMEOUT && $ip_addr != $addr) {
fputs($fp, $ip_addr.'|'.$stamp);
}
}
fputs($fp, $addr.'|'.$now."\n");
fclose($fp);
$count = count($usr_arr);
$data = '<div style="background-color: #000000; color: #00FF00;">Currently <b>'.$count.'</b> unique user'.($count > 1 ? 's' : '').' online</div>';
echo $data;
?>
Post number
No.
66462
Board
Site Discussion@Heyuri
Reason
Optional. Describe what's wrong with it.
Style: