HorrorShow
恐怖動画&心霊映像
ページ更新
↓クリックで入口出現↓
>>恐山<<
//------------設定----------
//テキストカウンタなら0 画像カウンタなら1
$mode = 0;
// 昨日カウント用GIF画像のディレクトリ
$yes_path = './1/';
// 本日カウント用GIF画像のディレクトリ
$day_path = './1/';
// 総カウント用GIF画像のディレクトリ
$all_path = './1/';
// カウンタ記録ファイル
$log = './log/all.dat';
//---------設定ここまで------
function outhtml($f_cnt, $c_path){//カウント数とパスを与えて、IMGタグを返す
$size = getimagesize($c_path."0.gif"); //0.gifからwidthとheight取得
for ($i=0; $i";
endfor;
return $i_tag;
}
$now_date = gmdate("Ymd", time()+9*3600); // 今日の日付
$yes_date = gmdate("Ymd", time()-15*3600); // -24h
$dat = file($log); // ファイルを配列に
list($key, $yes, $tod, $all, $addr)=explode("|", $dat[0]);//データを分解
$ip = getenv('REMOTE_ADDR');
if(($ipcheck && $ip != "$addr") || $ipcheck==0){//直前IPが違うならカウントアップ
if($key == $now_date){//キーが今日なら今日をアップ
$tod++;
}else{
$yes = ($key == $yes_date) ? $tod : 0;//キーが昨日なら昨日に今日カウント格納それ以外は0
$tod = 1;
}
$all++;//合計をカウントアップ
$new = implode("|", array($now_date,$yes,$tod,$all,$ip));//データ連結
$fp = fopen($log, "w");//ファイルに保存
flock($fp,2);
fputs($fp, $new);
fclose($fp);
}
//カウント整形(空いた桁を0で埋める)
$yesterday = sprintf("%0".$fig1."d", $yes);
$today = sprintf("%0".$fig2."d", $tod);
$total = sprintf("%0".$fig3."d", $all);
if($mode){
//タグを取得(画像出力)
$yesterday = outhtml($yesterday, $yes_path);
$today = outhtml($today, $day_path);
$total = outhtml($total, $all_path);
}
?>今日 昨日
合計
恐怖,心霊,グロ
筑豊の怖い話
ケータイ検索Yicha.jp
(c)2005 HorrorShow