> I am trying to read in a nav bar from a remote web page into my web page.
> There is a comment at the start <!-- 1st Column start --> and one at the
end
> <!-- 1st Column end -->, and i want to be able to read in everything
between
> these two comments.

How sure are you that these comments won't change...?

<?php
    $remote = file("http://whatever.com/navbar.htm";) or die("Could not snag
remote web page.");
    $html = implode('', $remote);
    $parts = explode('<!-- 1st Column start -->', $html);
    $goodpart = $parts[1];
    $parts = explode('<!-- 1st Column end -->', $goodpart);
    $navbar = $parts[0];
    echo $navbar;
?>

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to