Jump to content

Archived

This topic is now archived and is closed to further replies.

zawadi

firefox bookmarks *CLOSED*

Recommended Posts

ok, a bit of a strang thing, but I want to upload my firefox bookmark to my website and then import them in to a database. but I dont know how to get the info out of the file, can any one help me?

Share this post


Link to post
Share on other sites
This is an IE shortcut but i beleave firefox shortcuts are the same..

[DEFAULT]
BASEURL=http://www.ukchat.ws/
[InternetShortcut]
URL=http://www.ukchat.ws/


Basicaly if opened in bnotepad the above is what you see, If you ask in the regex forum i'm sure someone could help you parse this to get just the address and then only other thing u need is the files name which is what the bookmark show's as in firefox

Regards
Liam

Share this post


Link to post
Share on other sites
sorry, not in firefox. Firefox uses an html file to store all the bookmarks, but I just want to read the ancors in the html file.

Share this post


Link to post
Share on other sites
you could use regular expressions to grab the anchors.

if the HTML file was valid XML, you could have used PHP 5's XML functions if you were using PHP 5 but unfortunately it's not valid XML.

i believe this expression would work, haven't tested it out...been out of touch with RegExp for quite some time but some of the members on this board are very good at it so hopefully they can help you out better if i'm wrong.
[code]
'|href="(.*)+"|im'
[/code]


you could use that in conjunction with preg_match() to grab the data you want into an array.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.