File "log_view_map.php"
Full path: /www/beacon/log_view_map.php
File size: 1.52 KiB (1559 bytes)
MIME-type: text/x-php
Charset: utf-8
<?php
// ===============================================
// GD処理準備
// 備考 :
// 更新 : 2010/09/08 KMK T.Teraoka
// ===============================================
//定数
$posi_base_x = 40;
$posi_base_y = 20;
$x_item = 26;
$y_item = 100;
$recive_no_start = 200;
$x_size = 550;
$y_size = $posi_base_y * ($y_item + 1);
$img = imagecreatetruecolor($x_size,$y_size); //パレットの作成
//$font1 = "/www/fonts/VL-Gothic-Regular.ttf";
//$font1 = "/usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf";
//$font1 = "/www/ansys/config/fonts/vlgothic/VL-Gothic-Regular.ttf";
$font1 = "/www/ansys/config/fonts/ipam.ttf";
// 使用色の準備
$Black = imagecolorallocate($img, 0,0,0);
$White = imagecolorallocate($img, 255, 255, 255);
$Red = imagecolorallocate($img, 255, 0, 0);
$Green = imagecolorallocate($img, 0, 128, 0);
$Blue = imagecolorallocate($img, 0, 0, 255);
$LightBlue = imagecolorallocate($img, 0, 191, 255);
$Orange = imagecolorallocate($img, 255, 165, 0);
imagefilledrectangle($img,0,0,$x_size,$y_size,$White);
$output=null;
$retval=null;
exec('tail -n ' .$y_item .' /www/beacon/data/192.168.0.207.txt | grep "3d:ff"', $output, $retval);
//echo "Returned with status $retval and output:\n";
$ct = count($output);
//横軸の作成
for($ay = 0;$ay < $y_item;$ay++)
{
$y_plus =$ay *$posi_base_y;
$i = $ct - $ay-1;
//データ表示
ImageTTFText ($img, 11, 0, 4, 35 + $y_plus , $Black, $font1, $output[$i]);
}
header('Content-Type: image/png');
imagepng($img);
imagedestroy($img);
?>