3 ){ header('Location: http://*********/index.php?Result=このシリアルコードはこれ以上使用できません&code='.$_POST['code'] ); mysql_free_result($result); mysql_close($link); exit; } $incCount = $row["FLG"]; } //---------------------------------------------------------------------------------------- $incCount += 1; $intDate = date("ymdHi"); $result = mysql_query("UPDATE ********* SET UPDATEDATE = ". $intDate . ", IP = '" . $ip . "',FLG = " . $incCount . ",IPCHANGE = " . $intIPCnt . " WHERE CEREAL = '".$_POST['code'] ."'"); if( $result ){ // out of memoryエラーが出る場合に出力バッファリングを無効 while (ob_get_level() > 0) { ob_end_clean(); } ob_start(); // ファイル出力 if ($file = fopen($path, 'rb')) { while(!feof($file) and (connection_status() == 0)) { echo fread($file, '4096'); //指定したバイト数ずつ出力 ob_flush(); } ob_flush(); fclose($file); } ob_end_clean(); }else{ header('Location: http://*********/index.php?Result=データベースエラー&code='.$_POST['code'] ); mysql_free_result($result); mysql_close($link); exit; } $strStr = <<<__STR シリアルコード入力画面 %s __STR; printf ($strStr, $strResult); mysql_free_result($result); mysql_close($link); ?>