if($_POST): $url='https://docs.google.com/spreadsheets/d/e/2PACX-1vRh1-Bx-kPf46sVR_W627ofOf1u5bG0HUJI7pOFgGKmkE9kuImt0SqXRl8J6tp-biYWgQEaGpQpNUh_/pub?gid=0&single=true&output=tsv'; $ch = curl_init($url); //curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($ch); curl_close($ch); $array=array(); $delimiter = "\n"; $splitcontents = explode($delimiter, $data); foreach ( $splitcontents as $line ) { array_push($array,explode("\t", $line)); } foreach($array as $rs): if($rs[0]==$_POST["protocolo"]&$rs[1]==$_POST["password"]): $link= $rs[2]; endif; endforeach; if(!$link): $error=true; endif; endif; ?>