isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer'); $mobile = false; if ($detect->isMobile() || $detect->isTablet()) { $mobile = true; } else { $mobile = false; } function timeGreetings(){ $ip_address = getenv('HTTP_CLIENT_IP') ?: getenv('HTTP_X_FORWARDED_FOR') ?: getenv('HTTP_X_FORWARDED') ?: getenv('HTTP_FORWARDED_FOR') ?: getenv('HTTP_FORWARDED') ?: getenv('REMOTE_ADDR'); $jsondata = file_get_contents("http://timezoneapi.io/api/ip/?" . $ip_address); $data = json_decode($jsondata, true); if($data['meta']['code'] == '200'){ $hour_part = $data['data']['datetime']['hour_24_wilz']; if($hour_part <= 12){ $r= "Good Morning"; }elseif($hour_part <= 16) { $r= "Good Afternoon"; }elseif($hour_part <= 20) { $r= "Good Evening"; }elseif($hour_part <= 24) { $r= "Good Night"; } } return $r; } ?>
There is No need to listen to auto answering system
instructions or no need to hold