Re: Retrieving Content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actualy I went a slightly diffent way, I tried to use the file()  like
on the script below and I get the content of the whole page but when I
try to get a single line from the array it all goes sideways. Here
goes the script with the correct urls, remembering that I'm using it
on the local server thats why I save it on the file to see if its
getting the right content:

$fc = file('http://www.fanfiction.net/s/979216/1/');
$f=fopen("some.txt","w");

foreach($fc as $line)
{
    if ($line[85])
    { //look for $key in each line
          fputs($f,$line[85]);
    } //place $line back in file
    echo "$line";
}


It shows the whole page but saves on the file something grambled that
I cant identify what it is.

Iknow that when opening the html result of the page that I need to get
the content its the second SELECT, and its actually on line 86, but
since the PHPEd dont use line 0 it should be right. Or I'm missing
something...

Thanks,
Rodrigo

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux