Function to get time remain in PHP