= (104*20)){ rename($henkanlogfile1,$henkanlogfile2); } $fp = fopen($henkanlogfile1,"a"); fwrite($fp,"\n"); fclose($fp); } } // ソスOソスソスソスソスソスフ趣ソスソスソス $secondtime = microtime_float(); //ソスIソスソスソスWソスiソスソスソスフハソスbソスVソスソスソスソスソスソスソスソスソスソスソスソスソス鼾ソスGソスソスソス[ソスソスヤゑソス if(!$sha1){ header("Content-Type: image/jpeg"); noimage(); $chashethis="noimage";$size=0;$size2=0; getlog($chashethis,$thumbfilename,$uag,$size,$size2); exit; } //ソスソスハサソスCソスYソスソスソス謫セ if($pd = phone_display()){ // $pd = phone_display(); $uag = "FROMUAG"; } else { $pd = "460x340"; $uag = "DEFAULT"; } // ソス謫セソスソスソスソスソスtソス@ソスCソスソスソスフ費ソスソスソス $fty2 = preg_match("/.*(\.gif$)/i",$_REQUEST["img"],$arr); $fty = preg_match("/.*\.(.*)$/i",$_REQUEST["img"],$arr); // ソスwソスbソス_ソスニフソス@ソスCソスソスソスフ厄ソスソスOソスソスソス謫セ.$_REQUEST["img"]." /img/".$thumbfilename if($arr[1] == "gif"){ $hdr = "image/gif"; $ext = ".gif"; } else if($arr[1] == "jpg" or $arr[1] == "jpeg") { $hdr = "image/jpeg"; $ext = ".jpg"; } else { $ext = ".jpg"; } //ソスLソスソスソスbソスVソスソスソスtソス@ソスCソスソスソスソスソスソスソスソスソス゚ゑソス $thumbfilename = $pd."/".$sha1."-".$sha2.$ext; // ソスソスソスソスソスフ趣ソスソスソス $thirdtime = microtime_float(); // ソスLソスソスソスbソスVソスソスソスソスソスソス if(file_exists($thispath."/img/".$thumbfilename) and $s_cashe){ if(!$chashethis){ $chashethis = "cashed"; } } else { // ソスtソスHソスソスソス_ソス成 if(!file_exists($thispath."/img/".$pd)){ mkdir($thispath."/img/".$pd,0777); chmod($thispath."/img/".$pd,0777); } exec("convert -depth 8 -compress BZip -density 72 -quality 80 -thumbnail ".$pd." tmp/".$sha2." ".$thispath."/img/".$thumbfilename); $chashethis = "create"; } // ソスソスソスソスソスフ趣ソスソスソス $forthtime = microtime_float(); if(file_exists($thispath."/img/".$thumbfilename)){ $handle = fopen($thispath."/img/".$thumbfilename, "r"); $contents2 = ''; while (!feof($handle)) { $contents2 .= fread($handle, 8192); } fclose($handle); header("Content-Type: ".$hdr); echo $contents2; } else { header("Content-Type: image/jpeg"); noimage(); if($chashethis == "create"){ //ソスマ奇ソスソスGソスソスソス[ソスソスソス[ソスソスソスソスソスMソスネゑソス } } //ソスLソスソスソスbソスVソスソスソスtソス@ソスCソスソスソスeソスハ取得 @$size = filesize($thispath."/img/".$thumbfilename); //ソスIソスソスソスWソスiソスソスソスtソス@ソスCソスソスソスeソスハ取得 $size2 = ""; if(file_exists($thispath."/tmp/".$sha2)){ $size2 = filesize($thispath."/tmp/".$sha2); unlink($thispath."/tmp/".$sha2); } } else { if($notfound){ header("HTTP/1.0 404 Not Found"); } else { header("Content-Type: image/jpeg"); noimage(); } if($_REQUEST["img"] and !$gonext){ $chashethis = "noreturn"; } else { $chashethis = "noimage"; } $size="0"; $size2="0"; } getlog($chashethis,$thumbfilename,$uag,$size,$size2); //============================ function getlog($chashethis,$thumbfilename,$uag,$size,$size2){ global $thispath,$firsttime,$secondtime,$thirdtime,$forthtime; // ソスソスソスOソスtソス@ソスCソスソスソスフ作成 $logroots = $thispath."/log/"; $thisf = date("Ym"); if(!file_exists($logroots.$thisf)){ mkdir($logroots.$thisf,0777); chmod($logroots.$thisf,0777); } $fifthtime = microtime_float(); $logs = @$_SERVER["HTTP_REFERER"]."<>".@$_SERVER["SCRIPT_FILENAME"]."<>".$chashethis."<>".$thumbfilename."<>".$_REQUEST["img"]."<>".@$_SERVER["HTTP_USER_AGENT"]."<>".@$_SERVER["REMOTE_ADDR"]."<>".gethostbyaddr(@$_SERVER["REMOTE_ADDR"])."<>".date("Y-m-d H:i:s")."<>".$firsttime."<>".$secondtime."<>".$thirdtime."<>".$uag."<>".$size."<>".$size2."<>".$forthtime."<>".$fifthtime."<>\n"; $fp = fopen($logroots.$thisf."/".date("d").".txt","a"); fwrite($fp,$logs); fclose($fp); } function phone_display(){ $agent = $_SERVER["HTTP_USER_AGENT"]; //$agent = "DoCoMo/2.0 MST_v_SH2101V(c100)"; //$agent = "DoCoMo/1.0/F251i/c10/TB"; $phone = uaa(); if($phone == "i"){ if(preg_match("/^DoCoMo\/2\.0/i",$agent)){ preg_match("/^(DoCoMo\/2\.0 )?([^\(]+)/i",$agent,$matches); $typ = $matches[2]; } else if(preg_match("/^(DoCoMo\/1\.0\/)?([^\/]+)/i",$agent,$matches)){ $typ = $matches[2]; } else { } //echo $typ; $dp = "640x480"; $fl = file("docomo0606.csv"); for($i=0;$i