Skip to content

Instantly share code, notes, and snippets.

@AmusableLemur
Created April 1, 2013 14:42
Show Gist options
  • Save AmusableLemur/5285309 to your computer and use it in GitHub Desktop.
Save AmusableLemur/5285309 to your computer and use it in GitHub Desktop.
<?php
// File with bookmark class
require 'bookmarks.php';
// Create our bookmark parser with the backup files we want to load from
$parser = new BookmarkParser(
array(
"bookmarks_chrome_1.html",
"bookmarks_chrome_2.html",
"bookmarks_firefox.html"
)
);
// Loop over the extracted bookmarks
foreach ($parser->getBookmarks() as $bookmark) {
// Print the bookmark like "Title: Link"
printf("%s: %s<br />\n", $bookmark['title'], $bookmark['url']);
// Here any database calls can be made to store the bookmark data in a database
}
@dobestpossible
Copy link

Thank you! I know it's almost been a full year since I last seen your website and that you had done this extra work to help me. I'm still working on and practicing study, most recently Harvard's CS50.net
Great stuff and useful utility.
-Glenn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment