indexing with fopen
- From: dante@xxxxxxxxxxxxxxx (Miguel Vaz)
- Date: Sun, 25 Feb 2007 18:43:21 +0000
Hi,
I am trying to add a search to the site i am developing but i ran into a bit of a problem.
Since the site is mainly dynamic (lots of includes and mysql queries), i thought of building an index table that will contain the insides of all the pages in the site tree. I was thinking of opening each page with fopen, stripping the html, and storing it in a database table. Then i would only search there.
The problem is that i cant seem to read the pages with fopen:
example of urls:
index.php?m=1
index.php?m=1&s=3
If i try to do this:
$page=fopen('index.php?m=1',"r");
if($page){
while (!feof($page)) {
$buff = fgets($page,4096);
$totalpage .= $buff;
}
}else{
echo "error";
}
I dont get the resolved content in $totalpage, but i get the includes and php commands that are inside index.php, which i find very strange. Should they resolve before they are retrieved?
Any help is highly appreciated. Thanks.
Miguel
.
- Follow-Ups:
- Re: [PHP] indexing with fopen
- From: "Richard Lynch"
- Re: [PHP] indexing with fopen
- From: Chris
- Re: indexing with fopen
- From: petersprc
- Re: indexing with fopen
- From: "João Cândido de Souza Neto"
- Re: [PHP] indexing with fopen
- Prev by Date: how to display images stored in DB
- Next by Date: Re: how to display images stored in DB
- Previous by thread: how to display images stored in DB
- Next by thread: Re: indexing with fopen
- Index(es):
Relevant Pages
|