Chat API Server Health Probe

'; if (!class_exists('Redis')){ http_response_code(500); //SET HTTP Response Code echo '

500 Error - Redis Module not installed

'; exit(); } try{ $redis = new Redis(); $redis->connect('127.0.0.1', 6379); //check whether server is running or not echo "

In Service: ".$redis->ping()."

"; }catch (Exception $e) { http_response_code(500); //SET HTTP Response Code //echo '

500 Error - Redis' . $e . '

'; echo '

500 Error - Redis

'; exit(); } ?>