View Single Post
Old 06-24-2009, 02:54 AM   #4 (permalink)
benton
The Contributor
 
Join Date: Apr 2008
Posts: 78
Thanks: 0
benton is on a distinguished road
Default

Thanks for the replies. I tried both of the suggestions but got different results from before. I must not have commented out the next line in the code since that is where it is failing - on an eregi call. What I did was add some code to record the results of that call. In php 4, the results range from FALSE to some number. In php 5, they are always FALSE. The reason for the delay is that since the result isn't being found, it has to cycle through all of the pages. In php 4, the result is found on the first page so it stops. So the problem is with that call. The code looks like this:
Code:
$fp = fopen("track.txt","w");

$file = fopen($filename, "r");
if (!$file) 
{
  echo "<p>Unable to open remote file $filename.\n";
}
else
{          
  while (!feof($file)) 
  {
    //this records the result of the eregi call
    if ($fp)
      fputs($fp,(eregi("<cite>(.*)</cite>", $var, $out)."\n"));
      
     
    //this is the normal code      
    if (eregi("<cite>(.*)</cite>", $var, $out))
    {
    } 
  }
}
I looked up the eregi command and there is a note that says,
Quote:
Note: As of PHP 5.3.0 the regex extension is deprecated, calling this function will issue an E_DEPRECATED notice.
but I don't see any other mention of "regex extension" on that page and I don't know what it refers to so I don't know if that applies here or not. Does nayone see a problem with the way that line is being used?
benton is offline  
Reply With Quote