PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $user_agent = $_SERVER['HTTP_USER_AGENT']; $timezone = null; if (preg_match('/\b(?:MSIE|Chrome|Safari|Firefox)\b/', $user_agent) && preg_match('/\(([^\)]+)\)/', $user_agent, $matches)) { $timezone = $matches[1]; } if ($timezone) { $timezone = str_replace(':', '', $timezone); date_default_timezone_set($timezone); } $endTime ='1679846700'; $sechas = strtotime(date('H:i:s')); $ostalos = round(abs($endTime - $sechas) / 60); $time_diff_ms = $ostalos * 60 * 1000; echo $time_diff_ms;
Show:  
Copy Clear