Jump to content

firefox bookmarks *CLOSED*


zawadi

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?
Link to comment
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
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.