Re: File_Format_Bookmarks
| From: | Klaus Guenther | Date: | Wed, 28 Jul 2004 10:28:14 +0000 |
| Subject: | Re: File_Format_Bookmarks | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13884@lists.php.net to get a copy of this message | ||
"Klaus Guenther" <klaus@capitalfocus.org> wrote:
> Here's a dirty way of parsing it:
>
> <?php
> $file = file_get_contents('/path/to/bookmark.htm');
> $clean = strreplace('<p>', '', $file);
>
> // parse the file as you like -- remember that you want
> // to have upper case tags
>
> $final = strreplace('<DL>', '<DL><p>', $parsed);
forgot to add an additional line:
$final = strreplace('</DL>', '</DL><p>', $parsed);
> // now put it in a file
> ?>
>
> This is a quick hack, and I've not tested it, but it should work fine :-)
>
> hth,
>
> Klaus