<?php
$dataAtual = "2017-05-20";
$date_crl = "2017-04-10";
$dif_tempo = $time_expira - $time_atual;
$dias = (int
)floor( $dif_tempo / (60 * 60 * 24));
if ($dias <= 30 && $dias > 0){
echo "ALERTA";
}elseif($dias<0){
echo "VENCIDO";
}else{
echo "VIGENTE";
}
PD9waHAKCiRkYXRhQXR1YWwgPSAiMjAxNy0wNS0yMCI7CiRkYXRlX2NybCA9ICIyMDE3LTA0LTEwIjsKIAogCiAKJHRpbWVfYXR1YWwgPSBzdHJ0b3RpbWUoJGRhdGFBdHVhbCk7CiAKJHRpbWVfZXhwaXJhID0gc3RydG90aW1lKCRkYXRlX2NybCk7CiAKJGRpZl90ZW1wbyA9ICR0aW1lX2V4cGlyYSAtICR0aW1lX2F0dWFsOwogCiRkaWFzID0gKGludClmbG9vciggJGRpZl90ZW1wbyAvICg2MCAqIDYwICogMjQpKTsKIAppZiAoJGRpYXMgPD0gMzAgJiYgJGRpYXMgPiAwKXsKICAgIGVjaG8gIkFMRVJUQSI7Cn1lbHNlaWYoJGRpYXM8MCl7CiAgICBlY2hvICJWRU5DSURPIjsKfWVsc2V7CiAgICBlY2hvICJWSUdFTlRFIjsKfQ==