Page 1 of 1

import Favorite / Bookmark into mysql database

Posted: Mon Apr 04, 2005 5:03 pm
by alliance
Hello,

I would like to add a boutton to click, once clicked all Internet Explorer (and Morzilla) bookmark/favorite have to get selected and imported into a MySQL database.

Map in table "category"
link text and link URL in table "link"

The goal is to have displayed on screen his own bookmark sorted by categories

The query to get the data displayed is not a problem, but I would like to know if anyone have already writen a script / query to import from the local bookmark to a MySQL database ?

I hope you can help ?

Thanks

Posted: Mon Apr 04, 2005 5:14 pm
by feyd
You want to automatically extract the bookmarks from the browser and import them into your site? I don't believe that's possible. Not only is it a potential security or privacy problem, but I don't think the DOM allows access to the information. Period.

The "best" you could do is walk them through how to export all their bookmarks and upload the file(s) to your site.

Posted: Tue Apr 05, 2005 4:28 pm
by alliance
Thanks feyd,

I will consider to have the bookmark export and uploaded, then displayed.

We are building a solution where members can have their own bookmark online, to use from home, work or while traveling.

At the time we implement to add the bookmark one by one, but this is not user friendly, one single click is much better, that's why we are looking for a solution to extract the bookmark from local PC.

Bookmark export function give the result in a html file with
the map:

Code: Select all

<DT><H3 FOLDED ADD_DATE=&quote;1110973748&quote;>Links</H3>
the link in that map

Code: Select all

<DT><A HREF=&quote;http://red.clientapps.yahoo.com/customize/links/ymsgr/*http://my.yahoo.com/&quote; ADD_DATE=&quote;1110973748&quote; LAST_VISIT=&quote;1112712103&quote; LAST_MODIFIED=&quote;1073575048&quote;>My Yahoo!</A>
Is there any way to extract or modify those informations to have the result in csv or any other workable data ?

Posted: Tue Apr 05, 2005 5:31 pm
by feyd
build a parser for it, if you can't find (a good) one... I usually use regular expressions to extract data, but most people think I'm a masocist on that front. :) I love'em. They're my friend....

Anyway, if you don't want to deal with regular expressions.. the ghetto way uses explode(), and several string functions..

Posted: Wed Apr 06, 2005 7:55 am
by timvw
i use firefox and the bookmarks synchronization extension...

i generate a bookmarks page on my site like this (xml/xsl):
http://timvw.madoka.be/stuff/bookmarks.php.txt
http://timvw.madoka.be/stuff/bookmark.xsl