PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
What im trying to do is to get my code to compare two date times (a and b). And if a is >7 minutes in time difference then continue with the if statement if else ignore.
But im stuc and dont know how to do this. Any help will be greatly appreciatted.
$mylogtime = $log_time;
$find = 'booked/excursions/index.php';
if (strpos($request, $find) == true) //SURELY IN HERE I SHOULD USE $array[$key - 1]?? comparing $mylogtime and $log_time ??
If you compare them, they will always be the same, since you set them equal to each other.
Comparing times is easier than comparing dates. You might want to look at strtotime() to convert dates to timestamps.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
$fp = fopen($filename, "r"); //Open the server log
$content = fread($fp, filesize($filename)); // Read the server log
$content = explode("\n", $content); // explode into array