Date: 12/01/00
- Next message: R.B. Scholtus: "Re: [phplib-dev] Re: [phplib] PHPlib session using PHP4 sessions implementation: the code"
- Previous message: Ulf Wendel: "Re: [phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
i'm making a search engine, but i'm not using MySQL, i'm using "fopen", and your utilities......
And i'd like to know one command, to find one word in my DAT file, and i'm not find the command, my PHP code is:
This code is write in portuguese, because is for a brazilian site....
<?
$arquivo = "anuncios.dat";
if(!(file_exists($arquivo))){echo "<br><br><br><center><font size=2 face=verdana><b>Nenhum Anúncio Cadastrado!</b><br><br></font>";}else{
$abre = fopen($arquivo,'r');
$read = fread($abre,filesize($arquivo));
fclose($abre);
$var = split("<",$read);
echo "<font size=2 face=verdana><b>Palavra a ser encontrada : </b><i>".$palavra."</i><br><br>";
for($i=0;$i<count($var)-1;$i++){
$varr[$i] = split("=",$var[$i]);
$q = strrchr($varr[$i][7],$palavra);
if($palavra == $varr[$i][7] || $q){
echo "<font size=2 face=verdana><b>Título : </b>".$varr[$i][6]."<br><b>Conteúdo : </b>".$varr[$i][7]."<br><b>Responsável : </b><a href=mailto:".$varr[$i][1].">".$varr[$i][0]."</a> (<b>Telefone : </b>(0xx".$varr[$i][2].")-".$varr[$i][3].")<br><b>Cidade/Estado : </b>".$varr[$i][4]."/".$varr[$i][5]."<br><b>Categoria : </b>".$varr[$i][8]."<br><br>";
}}}
?>
If anyone know how i find a word in a DAT file, please contact me...
phpdesign <email protected>
thank's..............
- Next message: R.B. Scholtus: "Re: [phplib-dev] Re: [phplib] PHPlib session using PHP4 sessions implementation: the code"
- Previous message: Ulf Wendel: "Re: [phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

