Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-28 Thread David McGlone
On Sun, 2011-11-27 at 22:20 -0500, Paul M Foster wrote:
 On Sun, Nov 27, 2011 at 06:47:36PM -0500, David McGlone wrote:
 
  Hi all, I am wondering if it's possible to find the bookmarks file in
  firefox and output the contents on a page with PHP.. I'm wanting to do
  this so I can use it as my home page.
 
 The answer to this is not in PHP; it can be done in Firefox by itself.
 It's been a long time since I set this up, but if I'm not mistaken, the
 procedure goes like this:
 
 1. In Firefox, enter about:config in the URL bar. (Ignore warnings.)
 2. You are now in the raw configs. Search for a key called
 browser.bookmarks.autoExportHTML. Set this to 2. This should cause
 Firefox to dump the contents of it places.sqlite file to a file called
 bookmarks.html when Firefox is closed.
 3. Find another key called browser.startup.homepage. Set this to the
 absolute path of a file called bookmarks.html in your Firefox file tree.
 The path will be something like (in Linux):
 /home/username/.mozilla/firefox/random string.default/bookmarks.html.
 (Obviously, you'll have to locate this file ahead of time.)
 
 If this isn't the exact procedure, it's close. You can dig into the
 Firefox docs to get the exact values or keys if these aren't right. (For
 example, I don't know why the first key I mentioned is 2 instead of 1.)
 
 Anyway, I have my Firefox set up this way.

Hi Paul. The drawback I have found so far with this setup is that the
page will not update until firefox is restarted. do you have a
workaround for this?

-- 
Thanks,
David M.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-28 Thread Paul M Foster
On Mon, Nov 28, 2011 at 10:59:03AM -0500, David McGlone wrote:

 On Sun, 2011-11-27 at 22:20 -0500, Paul M Foster wrote:
  On Sun, Nov 27, 2011 at 06:47:36PM -0500, David McGlone wrote:
  
   Hi all, I am wondering if it's possible to find the bookmarks file in
   firefox and output the contents on a page with PHP.. I'm wanting to do
   this so I can use it as my home page.
  
  The answer to this is not in PHP; it can be done in Firefox by itself.
  It's been a long time since I set this up, but if I'm not mistaken, the
  procedure goes like this:
  
  1. In Firefox, enter about:config in the URL bar. (Ignore warnings.)
  2. You are now in the raw configs. Search for a key called
  browser.bookmarks.autoExportHTML. Set this to 2. This should cause
  Firefox to dump the contents of it places.sqlite file to a file called
  bookmarks.html when Firefox is closed.
  3. Find another key called browser.startup.homepage. Set this to the
  absolute path of a file called bookmarks.html in your Firefox file tree.
  The path will be something like (in Linux):
  /home/username/.mozilla/firefox/random string.default/bookmarks.html.
  (Obviously, you'll have to locate this file ahead of time.)
  
  If this isn't the exact procedure, it's close. You can dig into the
  Firefox docs to get the exact values or keys if these aren't right. (For
  example, I don't know why the first key I mentioned is 2 instead of 1.)
  
  Anyway, I have my Firefox set up this way.
 
 Hi Paul. The drawback I have found so far with this setup is that the
 page will not update until firefox is restarted. do you have a
 workaround for this?

Yeah, that's the rub. When I found the instructions for doing this, they
were clear that Firefox wouldn't update the file until the browser was
closed. Outside of that, you'd just have to read the actual SQLite file,
I suppose.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Finding and reading firefox bookmarks with PHP

2011-11-27 Thread David McGlone
Hi all, I am wondering if it's possible to find the bookmarks file in
firefox and output the contents on a page with PHP.. I'm wanting to do
this so I can use it as my home page.
-- 
Thanks,
David M.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-27 Thread Camilo Sperberg
You can export the bookmarks as a json or html and then read it easily with php 
but i suspect you want to read the firefox files directly, in which case you 
can read the sqlite file called places.sqlite

More info here:
http://support.mozilla.com/en-US/kb/Profiles

Sent from my iPhone 5 Beta [Confidential use only]

On 28 nov. 2011, at 00:47, David McGlone da...@dmcentral.net wrote:

 Hi all, I am wondering if it's possible to find the bookmarks file in
 firefox and output the contents on a page with PHP.. I'm wanting to do
 this so I can use it as my home page.
 -- 
 Thanks,
 David M.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-27 Thread David McGlone
On Mon, 2011-11-28 at 01:15 +0100, Camilo Sperberg wrote:
 You can export the bookmarks as a json or html and then read it easily with 
 php but i suspect you want to read the firefox files directly, in which case 
 you can read the sqlite file called places.sqlite
 
 More info here:
 http://support.mozilla.com/en-US/kb/Profiles
 
 Sent from my iPhone 5 Beta [Confidential use only]
 
 On 28 nov. 2011, at 00:47, David McGlone da...@dmcentral.net wrote:
 
  Hi all, I am wondering if it's possible to find the bookmarks file in
  firefox and output the contents on a page with PHP.. I'm wanting to do
  this so I can use it as my home page.

I realized I wasn't very clear with the post after I sent it. I
apologize. But you are correct, I was wondering if there was an easy way
to just use readfile to read the bookmarks file, but I looks like I'll
be having to get the info from the sqllite db instead. (At least that's
what I'm thinking at the moment now that I know what file the bookmarks
are stored in)

-- 
Thanks,
David M.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-27 Thread Curtis Maurand


It seems to me that the file structure should be in the source code 
somewhere and you can download that.


--C

On 11/27/2011 7:28 PM, David McGlone wrote:

On Mon, 2011-11-28 at 01:15 +0100, Camilo Sperberg wrote:

You can export the bookmarks as a json or html and then read it easily with php 
but i suspect you want to read the firefox files directly, in which case you 
can read the sqlite file called places.sqlite

More info here:
http://support.mozilla.com/en-US/kb/Profiles

Sent from my iPhone 5 Beta [Confidential use only]

On 28 nov. 2011, at 00:47, David McGloneda...@dmcentral.net  wrote:


Hi all, I am wondering if it's possible to find the bookmarks file in
firefox and output the contents on a page with PHP.. I'm wanting to do
this so I can use it as my home page.

I realized I wasn't very clear with the post after I sent it. I
apologize. But you are correct, I was wondering if there was an easy way
to just use readfile to read the bookmarks file, but I looks like I'll
be having to get the info from the sqllite db instead. (At least that's
what I'm thinking at the moment now that I know what file the bookmarks
are stored in)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-27 Thread Paul M Foster
On Sun, Nov 27, 2011 at 06:47:36PM -0500, David McGlone wrote:

 Hi all, I am wondering if it's possible to find the bookmarks file in
 firefox and output the contents on a page with PHP.. I'm wanting to do
 this so I can use it as my home page.

The answer to this is not in PHP; it can be done in Firefox by itself.
It's been a long time since I set this up, but if I'm not mistaken, the
procedure goes like this:

1. In Firefox, enter about:config in the URL bar. (Ignore warnings.)
2. You are now in the raw configs. Search for a key called
browser.bookmarks.autoExportHTML. Set this to 2. This should cause
Firefox to dump the contents of it places.sqlite file to a file called
bookmarks.html when Firefox is closed.
3. Find another key called browser.startup.homepage. Set this to the
absolute path of a file called bookmarks.html in your Firefox file tree.
The path will be something like (in Linux):
/home/username/.mozilla/firefox/random string.default/bookmarks.html.
(Obviously, you'll have to locate this file ahead of time.)

If this isn't the exact procedure, it's close. You can dig into the
Firefox docs to get the exact values or keys if these aren't right. (For
example, I don't know why the first key I mentioned is 2 instead of 1.)

Anyway, I have my Firefox set up this way.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php