Created
April 1, 2013 14:42
-
-
Save AmusableLemur/5285309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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