--- a/trunklog.php +++ b/trunklog.php @@ -1,1 +1,31 @@ - +<?php +// http://www.unitrunker.com/logs.html +/* +Timestamp as YYYYMMDDHHMMSS +Site number in unformatted decimal +Action: Call, Leaves, Joins, Login, Logout, Drop, Add, Busy, Deny, Kill +Source type I or G +Source ID in unformatted decimal +Target type I or G +Target ID in unformatted decimal +Channel number in unformatted decimal +Call Type*/ +$row = 0; +echo "<table>"; +if (($handle = fopen("C:\Users\Madoka\AppData\Roaming\UniTrunker\S00000001\UniTrunker-20120411.LOG", "r")) !== FALSE) { + while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { + + if ($row > 0 && count($data) == 9) { + + echo "<tr>"; + for ($c=0; $c < count($data); $c++) { + echo '<td>'.$data[$c] . "</td>\n"; + } + echo "</tr>"; + } + $row++; + } + fclose($handle); +} +echo "</table>"; +?>