$db_host = "hoge"; $db_port = "????"; $db_name = "test"; $db_table = "counter"; // データベース接続 $conn = pg_connect($db_host,$db_port,"","",$db_name); if (!$conn) { print("FATAL : データベース接続エラー\n"); ob_end_flush(); exit; } $log = pg_exec( $conn,"SELECT * FROM $db_table ;"); echo "
count | date | remote_host | http_user_agent | http_referer |
---|---|---|---|---|
" .pg_result($log, $i , "count") ." | " ); print("" .pg_result($log, $i , "date") ." | "); print("" .pg_result($log, $i , "remote_host") ." | "); print("" .pg_result($log, $i , "http_user_agent") ." | "); print("" .pg_result($log, $i , "http_referer") ." | "); print("