$v) { $cadena .= $k."=".$v."\n"; } // cadena $hash = hash_hmac('sha256', trim($cadena), hash('sha256', $token ,true)); // importante el trim! if(strcmp($hash, $_GET['hash']) !== 0) { die("

No se pudo identificar, no coincide la firma.

"); } else { if($_GET['auth_date'] < (time() - $tiempo*60)) { die(sprintf("Debe identificarse una vez más, ha pasado más de %d minutos.",$tiempo)); } else { //echo "Ya está identificado :-)"; $_SESSION['telegram'] = $get; //datos de identificación header("Location: https://tar.mx/apps/telegram/"); //redirige a mi página ejemplo } } } //EOF