Check SSL certificate expiry with PHP and curl