Thread: phpdigexplore
View Single Post
Old 06-10-2004, 05:46 AM   #1
fr :: anonymus
Green Mole
 
fr :: anonymus's Avatar
 
Join Date: Dec 2003
Location: Lyon, France
Posts: 17
phpdigexplore

Hi,

(it was a long time a didn't post, and my english is always so bad )

For the function phpdigexplore, it would be better not to make an array with the $file_content. If it would be made with a file (complete file), it didn't made errors with html tag, in end of the array.

For example :
PHP Code:
$tab = array(
  [
0] => "<TITLE>A Title</TITLE>",
  [
1] => "<BODY bgcolor=red>the body>",
  [
2] => "<TABLE cellspacing=.. cellpadding=.. etc etc...",
  [
3] => "background=red bgcolor=blue class=table_class",
...
    ); 
You see that the tag TABLE is in 2 lines. And i think that it is problem. Yes, or not ?

Anonymus.

It is possible to use the file_get_contents, to take all the file in only one file. After, you didn't have the foreach Buckle.

Example :
PHP Code:
function phpdigExplore($tempfile,$url,$path="",$file ="") {

    
$index 0;

    if (!
is_file($tempfile)) {
        return -
1;
        }
    else {
        
$file_content = @file_get_contents($tempfile);
        }

    if (!
is_string($file_content)) {
        return -
1;
        }
    else {
        
$links '';

$eval $file_content;
...
... 
?
__________________
http://tousenvacances.com
fr :: anonymus is offline   Reply With Quote