Buscar N° na RPI-INPI
[et_pb_section bb_built=”1″][et_pb_row][et_pb_column type=”1_2″][et_pb_code _builder_version=”3.0.63″]<?php<!– [et_pb_line_break_holder] –>$arquivo = “https://nitt.ufcg.edu.br/wp-content/uploads/2017/08/D2433.txt”;<!– [et_pb_line_break_holder] –>$procura = “BR 30 2012 001752-1”;<!– [et_pb_line_break_holder] –>$arrayArquivo = file($arquivo);<!– [et_pb_line_break_holder] –>$j = 1;<!– [et_pb_line_break_holder] –>$ContPalv[$j]= 0;<!– [et_pb_line_break_holder] –>$NumRev = $arrayArquivo[1];<!– [et_pb_line_break_holder] –>for($i = 0; $i < sizeof($arrayArquivo); $i++){<!– [et_pb_line_break_holder] –> if(strpos($arrayArquivo[$i],$procura)) {<!– [et_pb_line_break_holder] –> //echo “<b>(Foi encontrado nessa linha)</b> $arrayArquivo[$i]”; <!– [et_pb_line_break_holder] –> $ContPalv[$j]=$j;<!– [et_pb_line_break_holder] –> $j=$j+1;<!– [et_pb_line_break_holder] –> }else{<!– [et_pb_line_break_holder] –> //echo $arrayArquivo[$i];<!– [et_pb_line_break_holder] –> }<!– [et_pb_line_break_holder] –>}<!– [et_pb_line_break_holder] –>if ($j <> 1) {<!– [et_pb_line_break_holder] –> $j = $j-1;<!– [et_pb_line_break_holder] –> echo “Encontra(s) “.$ContPalv[$j].” termo(s) “.$procura.”<br />”;<!– [et_pb_line_break_holder] –> echo “Revista “.$arrayArquivo[2].”<br />”;;<!– [et_pb_line_break_holder] –>//echo “<script>alert(‘$ContPalv[$j]’);</script>”;<!– [et_pb_line_break_holder] –>}else{<!– [et_pb_line_break_holder] –> echo “Não foi encontra nenhum termo “.$procura.” nas revistas RPI!<br />”;<!– [et_pb_line_break_holder] –>}<!– [et_pb_line_break_holder] –><!– [et_pb_line_break_holder] –><!– [et_pb_line_break_holder] –>?>[/et_pb_code][/et_pb_column][et_pb_column type=”1_2″][et_pb_text _builder_version=”3.0.63″ background_layout=”light” text_orientation=”left” border_style=”solid” /][/et_pb_column][/et_pb_row][/et_pb_section]