I'm using PHP to read data from text file.
Here is the log data.
and the PHP:
$fileAccept = file_get_contents("\\\\192.168.184.13\\Reports\\".$dModel['MODEL_NAME'].$source."\\Accept\\Accept_".$dDtl['MODEL_CODE']."_".$dateCode."_".$dDtl['TS_CODE'].".txt");
$linesAccept = explode("\n",$fileAccept);
$rowsintimespanAccept = 0;
for($i = $readRowAfter; $i < count($linesAccept); $i++)
{
// if the fileAccept is "Tue, Sep 18<tab>2018<tab>23:59:53<tab>"
$dateobjAccept = DateTime::createFromFormat($createFromFormat, $linesAccept[$i]);
// check if date is in your Timespan
if($dateobjAccept < $toDateTime && $dateobjAccept > $fromDateTime)
{
$rowsintimespanAccept++; // count if in timespan
}
}
for($i = 0; $i < $rowsintimespanAccept; $i++)
{
//I need get date time here for each
}
That code is working OK.
But now I want to get each date time from text file.
Any clue how to do this?
