indexing with fopen




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
.



Relevant Pages

  • Re: Unable to get global configuration data.
    ... "SharinDenver" wrote: ... how to resolve the default website. ... on the web server. ... Unable to connect to database. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: User Rights Assignment - not available
    ... To resolve this issue, first run the Esentutl.exe tool to examine the ... and WinDir is the folder where Windows XP ... This operation may find that this database is corrupt ... Initiating INTEGRITY mode... ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Cant Install SP4 for SQL 2000 / Win2k3
    ... This explains why a reinstall did not fix the errors. ... ran 'sp_resetstatus msdb' from query analyzer, ... > The LSN %S_LSN passed to log scan in database '%.*ls' is invalid. ... > To resolve this problem, obtain the latest service pack for Microsoft SQL ...
    (microsoft.public.sqlserver.setup)
  • Re: User Rights Assignment - not available
    ... To resolve this issue, first run the Esentutl.exe tool to examine the ... and WinDir is the folder where Windows XP ... This operation may find that this database is corrupt ... Initiating INTEGRITY mode... ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Statistic Generator
    ... About your only option, short of implementing auditing in your SPs and adding triggers to the tables (to monitor i/u/d access) is to use Profiler or server-side tracing and watch activity, say over a 24-hour period. ... You can resolve the names against the system tables or use the object_namefunction within the context of the database. ... Over time we have replaced their applications with our own in-house applications, however not all of our programs have been upgraded so some of the tables and stored procedures may still be in use. ...
    (microsoft.public.sqlserver.tools)