zawadi Posted July 4, 2006 Share Posted July 4, 2006 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? Quote Link to comment Share on other sites More sharing options...
shocker-z Posted July 4, 2006 Share Posted July 4, 2006 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 firefoxRegardsLiam Quote Link to comment Share on other sites More sharing options...
zawadi Posted July 4, 2006 Author Share Posted July 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
Koobi Posted July 4, 2006 Share Posted July 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
zawadi Posted July 4, 2006 Author Share Posted July 4, 2006 thanks, I'll try that :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.