RE: [PHP] Backup to local drive

2009-12-12 Thread tedd

At 3:04 PM -0700 12/11/09, Ben Miller wrote:
That's exactly why I need something that will put all the needed 
files directly onto the flash drive - to take that responsibility 
away from the user.  Pulling the data from the DB and creating the 
folder structure is easy with PHP - just not sure how to copy that 
folder structure and related files to the flash drive without the 
user having to know much of anything about computers.  Was hoping 
there is maybe a PHP extension that I didn't know about, but sounds 
like a client side is going to be my best bet.


What you describe is an application that would run client-side. PHP 
will not be able to help you, nor will javascript for neither have 
that capability.


If the problem were mine, I would use Java to do this.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: Re: [PHP] Backup to local drive

2009-12-12 Thread Carl Furst
Two words: Java Applet.. That's the stuff that Facebook and other social
sites do stuff like this, Although I've only seen it for upload.

One thing perhaps you can do is have the applet command the browser to
save the page as a complete web page onto the flash drive.

it's cross platform and cross browser compatible... Also, maybe with
some JQuery plugins you can have what you need.

Hoping that inspires/helps,
Carl.

Ashley Sheridan wrote:
 On Fri, 2009-12-11 at 16:52 -0600, Joseph Thayne wrote:

   
 PHP cannot create a folder structure on your local machine.  I don't 
 think Javascript or VBScript can either.  Your best bet is with the zip 
 files.  Windows users have it fairly simple actually (as much as I hate 
 to admit it) as all they would have to do is right-click and Extract.  
 You can always include instructions in either an on-screen format or a 
 README file (or both). 

 As I have been thinking about it, you are going to need to do a zip file 
 so that the user only has to download a single file.

 Joseph

 Ashley Sheridan wrote:
 
 On Fri, 2009-12-11 at 15:04 -0700, Ben Miller wrote:
   
   
 That’s exactly why I need something that will put all the needed files
 directly onto the flash drive �C to take that responsibility away from
 the user.  Pulling the data from the DB and creating the folder
 structure is easy with PHP �C just not sure how to copy that folder
 structure and related files to the flash drive without the user having
 to know much of anything about computers.  Was hoping there is maybe a
 PHP extension that I didn’t know about, but sounds like a client side
 is going to be my best bet.

  


 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
 Sent: Friday, December 11, 2009 2:39 PM
 To: Ben Miller
 Cc: 'Roberto'; php-general@lists.php.net
 Subject: RE: [PHP] Backup to local drive



  

 On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote: 


  
 Too much reliance on the user knowing how to extract the files to the 
 flash drive �C need something that does it all for them so all they have 
 to do is insert the flash drive on their own computer to store the 
 preformatted presentation and then insert into a prospect’s computer and 
 either a) (preferred) run the presentation via an autoplay command or b) 
 open the presentation.html file.
  
  
 Ben
  
  
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
 Sent: Friday, December 11, 2009 2:25 PM
 To: Ben Miller
 Cc: 'Roberto'; php-general@lists.php.net
 Subject: RE: [PHP] Backup to local drive
  
  
 On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 
  
 Users would be updating data via form input (address, tel, product
 catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
 their own presentations and saving those presentations to a flash drive as
 HTML files with calls to the images/PDFs so that they can simply plug their
 drive into a USB port and present the info on the road, regardless of
 connection to the internet.
 Ben
 -Original Message-
 From: Roberto [mailto:prof...@gmail.com] 
 Sent: Friday, December 11, 2009 11:58 AM
 To: Ben Miller
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Backup to local drive
 Hi,
 you lost me a bit. Let say a user uploads a PDF file to one of your 
 servers.
 What do you mean when you say I want the users to be able to save the
 HTML output of their data?!?
 Roberto Aloi
 http://aloiroberto.wordpress.com
 Twitter: @prof3ta
 On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
 
 
 Hello - I have an application I'm building that allows users to store
 personal information and files (images, PDFs, etc.) in our database, but I
 need a way for them to be able to save the HTML output of that personal
   
   
 data
 
 
 to a local (for the user) flash drive.  I'm guessing I'm going to need a
 clientSide language like javascript for this, but was wondering if maybe
 there was a PHP addon or something like that for downloading content to
   
   
 the
 
 
 user's PC.  Thanks in advance.



 Ben


   
   
  
  
  
  
 Why not create all the HTML files and images on the server, and zip it up 
 then send that down to the user?
  
  
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
  
  
  
  



 That could end up in a lot of HTML and image files. Also, if you can't
 rely on people to unzip a file, can you rely on them to know that they
 need to keep the images with the HTML?

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk





  


 
 
 PHP can't do anything like that, PHP is all on the server. Javascript
 doesn't have anything like that either, but JScript and VBScript do I
 believe, although that limits you to only Internet Explorer, and only if
 the user has allowed the unsafe actions.

 Your best bet is to maybe try to use a format that keeps it all in one
 file, such as a PDF.

 Another solution would be to have the HTML reference

Re: [PHP] Backup to local drive

2009-12-11 Thread Joseph Thayne
If you are wanting to save the information as a PDF (formatted the same 
as the HTML page), check out tcpdf at www.tcpdf.org.  It is fairly 
simple to implement and can interpret an HTML page causing it to be 
saved as PDF.


Joseph

Ben Miller wrote:

Hello - I have an application I'm building that allows users to store
personal information and files (images, PDFs, etc.) in our database, but I
need a way for them to be able to save the HTML output of that personal data
to a local (for the user) flash drive.  I'm guessing I'm going to need a
clientSide language like javascript for this, but was wondering if maybe
there was a PHP addon or something like that for downloading content to the
user's PC.  Thanks in advance.

 


Ben


  


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



Re: [PHP] Backup to local drive

2009-12-11 Thread Roberto
Hi,

you lost me a bit. Let say a user uploads a PDF file to one of your servers.
What do you mean when you say I want the users to be able to save the
HTML output of their data?!?

Roberto Aloi
http://aloiroberto.wordpress.com
Twitter: @prof3ta

On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
 Hello - I have an application I'm building that allows users to store
 personal information and files (images, PDFs, etc.) in our database, but I
 need a way for them to be able to save the HTML output of that personal data
 to a local (for the user) flash drive.  I'm guessing I'm going to need a
 clientSide language like javascript for this, but was wondering if maybe
 there was a PHP addon or something like that for downloading content to the
 user's PC.  Thanks in advance.



 Ben



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



RE: [PHP] Backup to local drive

2009-12-11 Thread Ben Miller
Users would be updating data via form input (address, tel, product
catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
their own presentations and saving those presentations to a flash drive as
HTML files with calls to the images/PDFs so that they can simply plug their
drive into a USB port and present the info on the road, regardless of
connection to the internet.

Ben

-Original Message-
From: Roberto [mailto:prof...@gmail.com] 
Sent: Friday, December 11, 2009 11:58 AM
To: Ben Miller
Cc: php-general@lists.php.net
Subject: Re: [PHP] Backup to local drive

Hi,

you lost me a bit. Let say a user uploads a PDF file to one of your servers.
What do you mean when you say I want the users to be able to save the
HTML output of their data?!?

Roberto Aloi
http://aloiroberto.wordpress.com
Twitter: @prof3ta

On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
 Hello - I have an application I'm building that allows users to store
 personal information and files (images, PDFs, etc.) in our database, but I
 need a way for them to be able to save the HTML output of that personal
data
 to a local (for the user) flash drive.  I'm guessing I'm going to need a
 clientSide language like javascript for this, but was wondering if maybe
 there was a PHP addon or something like that for downloading content to
the
 user's PC.  Thanks in advance.



 Ben




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



RE: [PHP] Backup to local drive

2009-12-11 Thread Ashley Sheridan
On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote:

 Users would be updating data via form input (address, tel, product
 catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
 their own presentations and saving those presentations to a flash drive as
 HTML files with calls to the images/PDFs so that they can simply plug their
 drive into a USB port and present the info on the road, regardless of
 connection to the internet.
 
 Ben
 
 -Original Message-
 From: Roberto [mailto:prof...@gmail.com] 
 Sent: Friday, December 11, 2009 11:58 AM
 To: Ben Miller
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Backup to local drive
 
 Hi,
 
 you lost me a bit. Let say a user uploads a PDF file to one of your servers.
 What do you mean when you say I want the users to be able to save the
 HTML output of their data?!?
 
 Roberto Aloi
 http://aloiroberto.wordpress.com
 Twitter: @prof3ta
 
 On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
  Hello - I have an application I'm building that allows users to store
  personal information and files (images, PDFs, etc.) in our database, but I
  need a way for them to be able to save the HTML output of that personal
 data
  to a local (for the user) flash drive.  I'm guessing I'm going to need a
  clientSide language like javascript for this, but was wondering if maybe
  there was a PHP addon or something like that for downloading content to
 the
  user's PC.  Thanks in advance.
 
 
 
  Ben
 
 
 
 


Why not create all the HTML files and images on the server, and zip it
up then send that down to the user?

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] Backup to local drive

2009-12-11 Thread Ben Miller
Too much reliance on the user knowing how to extract the files to the flash 
drive – need something that does it all for them so all they have to do is 
insert the flash drive on their own computer to store the preformatted 
presentation and then insert into a prospect’s computer and either a) 
(preferred) run the presentation via an autoplay command or b) open the 
presentation.html file.

 

Ben

 

From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Friday, December 11, 2009 2:25 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive

 

On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 

 
Users would be updating data via form input (address, tel, product
catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
their own presentations and saving those presentations to a flash drive as
HTML files with calls to the images/PDFs so that they can simply plug their
drive into a USB port and present the info on the road, regardless of
connection to the internet.
 
Ben
 
-Original Message-
From: Roberto [mailto:prof...@gmail.com] 
Sent: Friday, December 11, 2009 11:58 AM
To: Ben Miller
Cc: php-general@lists.php.net
Subject: Re: [PHP] Backup to local drive
 
Hi,
 
you lost me a bit. Let say a user uploads a PDF file to one of your servers.
What do you mean when you say I want the users to be able to save the
HTML output of their data?!?
 
Roberto Aloi
http://aloiroberto.wordpress.com
Twitter: @prof3ta
 
On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
 Hello - I have an application I'm building that allows users to store
 personal information and files (images, PDFs, etc.) in our database, but I
 need a way for them to be able to save the HTML output of that personal
data
 to a local (for the user) flash drive.  I'm guessing I'm going to need a
 clientSide language like javascript for this, but was wondering if maybe
 there was a PHP addon or something like that for downloading content to
the
 user's PC.  Thanks in advance.
 
 
 
 Ben
 
 
 
 


Why not create all the HTML files and images on the server, and zip it up then 
send that down to the user?


Thanks,
Ash
http://www.ashleysheridan.co.uk



 



RE: [PHP] Backup to local drive

2009-12-11 Thread Ashley Sheridan
On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote:

 Too much reliance on the user knowing how to extract the files to the flash 
 drive – need something that does it all for them so all they have to do is 
 insert the flash drive on their own computer to store the preformatted 
 presentation and then insert into a prospect’s computer and either a) 
 (preferred) run the presentation via an autoplay command or b) open the 
 presentation.html file.
 
  
 
 Ben
 
  
 
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
 Sent: Friday, December 11, 2009 2:25 PM
 To: Ben Miller
 Cc: 'Roberto'; php-general@lists.php.net
 Subject: RE: [PHP] Backup to local drive
 
  
 
 On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 
 
  
 Users would be updating data via form input (address, tel, product
 catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
 their own presentations and saving those presentations to a flash drive as
 HTML files with calls to the images/PDFs so that they can simply plug their
 drive into a USB port and present the info on the road, regardless of
 connection to the internet.
  
 Ben
  
 -Original Message-
 From: Roberto [mailto:prof...@gmail.com] 
 Sent: Friday, December 11, 2009 11:58 AM
 To: Ben Miller
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Backup to local drive
  
 Hi,
  
 you lost me a bit. Let say a user uploads a PDF file to one of your servers.
 What do you mean when you say I want the users to be able to save the
 HTML output of their data?!?
  
 Roberto Aloi
 http://aloiroberto.wordpress.com
 Twitter: @prof3ta
  
 On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
  Hello - I have an application I'm building that allows users to store
  personal information and files (images, PDFs, etc.) in our database, but I
  need a way for them to be able to save the HTML output of that personal
 data
  to a local (for the user) flash drive.  I'm guessing I'm going to need a
  clientSide language like javascript for this, but was wondering if maybe
  there was a PHP addon or something like that for downloading content to
 the
  user's PC.  Thanks in advance.
  
  
  
  Ben
  
  
  
 
 
 
 Why not create all the HTML files and images on the server, and zip it up 
 then send that down to the user?
 
 
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
 
 
 
  
 


That could end up in a lot of HTML and image files. Also, if you can't
rely on people to unzip a file, can you rely on them to know that they
need to keep the images with the HTML?

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] Backup to local drive

2009-12-11 Thread Ben Miller
That’s exactly why I need something that will put all the needed files directly 
onto the flash drive – to take that responsibility away from the user.  Pulling 
the data from the DB and creating the folder structure is easy with PHP – just 
not sure how to copy that folder structure and related files to the flash drive 
without the user having to know much of anything about computers.  Was hoping 
there is maybe a PHP extension that I didn’t know about, but sounds like a 
client side is going to be my best bet.

 

From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Friday, December 11, 2009 2:39 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive

 

On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote: 

 
Too much reliance on the user knowing how to extract the files to the flash 
drive – need something that does it all for them so all they have to do is 
insert the flash drive on their own computer to store the preformatted 
presentation and then insert into a prospect’s computer and either a) 
(preferred) run the presentation via an autoplay command or b) open the 
presentation.html file.
 
 
 
Ben
 
 
 
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Friday, December 11, 2009 2:25 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive
 
 
 
On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 
 
 
Users would be updating data via form input (address, tel, product
catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
their own presentations and saving those presentations to a flash drive as
HTML files with calls to the images/PDFs so that they can simply plug their
drive into a USB port and present the info on the road, regardless of
connection to the internet.
 
Ben
 
-Original Message-
From: Roberto [mailto:prof...@gmail.com] 
Sent: Friday, December 11, 2009 11:58 AM
To: Ben Miller
Cc: php-general@lists.php.net
Subject: Re: [PHP] Backup to local drive
 
Hi,
 
you lost me a bit. Let say a user uploads a PDF file to one of your servers.
What do you mean when you say I want the users to be able to save the
HTML output of their data?!?
 
Roberto Aloi
http://aloiroberto.wordpress.com
Twitter: @prof3ta
 
On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
 Hello - I have an application I'm building that allows users to store
 personal information and files (images, PDFs, etc.) in our database, but I
 need a way for them to be able to save the HTML output of that personal
data
 to a local (for the user) flash drive.  I'm guessing I'm going to need a
 clientSide language like javascript for this, but was wondering if maybe
 there was a PHP addon or something like that for downloading content to
the
 user's PC.  Thanks in advance.
 
 
 
 Ben
 
 
 
 
 
 
Why not create all the HTML files and images on the server, and zip it up then 
send that down to the user?
 
 
Thanks,
Ash
http://www.ashleysheridan.co.uk
 
 
 
 
 


That could end up in a lot of HTML and image files. Also, if you can't rely on 
people to unzip a file, can you rely on them to know that they need to keep the 
images with the HTML?


Thanks,
Ash
http://www.ashleysheridan.co.uk



 



RE: [PHP] Backup to local drive

2009-12-11 Thread Ashley Sheridan
On Fri, 2009-12-11 at 15:04 -0700, Ben Miller wrote:
 That’s exactly why I need something that will put all the needed files
 directly onto the flash drive – to take that responsibility away from
 the user.  Pulling the data from the DB and creating the folder
 structure is easy with PHP – just not sure how to copy that folder
 structure and related files to the flash drive without the user having
 to know much of anything about computers.  Was hoping there is maybe a
 PHP extension that I didn’t know about, but sounds like a client side
 is going to be my best bet.
 
  
 
 
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
 Sent: Friday, December 11, 2009 2:39 PM
 To: Ben Miller
 Cc: 'Roberto'; php-general@lists.php.net
 Subject: RE: [PHP] Backup to local drive
 
 
 
  
 
 On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote: 
 
 
  
 Too much reliance on the user knowing how to extract the files to the flash 
 drive – need something that does it all for them so all they have to do is 
 insert the flash drive on their own computer to store the preformatted 
 presentation and then insert into a prospect’s computer and either a) 
 (preferred) run the presentation via an autoplay command or b) open the 
 presentation.html file.
  
  
 Ben
  
  
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
 Sent: Friday, December 11, 2009 2:25 PM
 To: Ben Miller
 Cc: 'Roberto'; php-general@lists.php.net
 Subject: RE: [PHP] Backup to local drive
  
  
 On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 
  
 Users would be updating data via form input (address, tel, product
 catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
 their own presentations and saving those presentations to a flash drive as
 HTML files with calls to the images/PDFs so that they can simply plug their
 drive into a USB port and present the info on the road, regardless of
 connection to the internet.
 Ben
 -Original Message-
 From: Roberto [mailto:prof...@gmail.com] 
 Sent: Friday, December 11, 2009 11:58 AM
 To: Ben Miller
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Backup to local drive
 Hi,
 you lost me a bit. Let say a user uploads a PDF file to one of your servers.
 What do you mean when you say I want the users to be able to save the
 HTML output of their data?!?
 Roberto Aloi
 http://aloiroberto.wordpress.com
 Twitter: @prof3ta
 On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
  Hello - I have an application I'm building that allows users to store
  personal information and files (images, PDFs, etc.) in our database, but I
  need a way for them to be able to save the HTML output of that personal
 data
  to a local (for the user) flash drive.  I'm guessing I'm going to need a
  clientSide language like javascript for this, but was wondering if maybe
  there was a PHP addon or something like that for downloading content to
 the
  user's PC.  Thanks in advance.
  
  
  
  Ben
  
  
  
  
  
  
 Why not create all the HTML files and images on the server, and zip it up 
 then send that down to the user?
  
  
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
  
  
  
  
 
 
 
 That could end up in a lot of HTML and image files. Also, if you can't
 rely on people to unzip a file, can you rely on them to know that they
 need to keep the images with the HTML?
 
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
 
 
 
 
 
  
 
 

PHP can't do anything like that, PHP is all on the server. Javascript
doesn't have anything like that either, but JScript and VBScript do I
believe, although that limits you to only Internet Explorer, and only if
the user has allowed the unsafe actions.

Your best bet is to maybe try to use a format that keeps it all in one
file, such as a PDF.

Another solution would be to have the HTML reference the images from
your own hosting, and put the entire presentation in one file.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Backup to local drive

2009-12-11 Thread Joseph Thayne
PHP cannot create a folder structure on your local machine.  I don't 
think Javascript or VBScript can either.  Your best bet is with the zip 
files.  Windows users have it fairly simple actually (as much as I hate 
to admit it) as all they would have to do is right-click and Extract.  
You can always include instructions in either an on-screen format or a 
README file (or both). 

As I have been thinking about it, you are going to need to do a zip file 
so that the user only has to download a single file.


Joseph

Ashley Sheridan wrote:

On Fri, 2009-12-11 at 15:04 -0700, Ben Miller wrote:
  

That’s exactly why I need something that will put all the needed files
directly onto the flash drive – to take that responsibility away from
the user.  Pulling the data from the DB and creating the folder
structure is easy with PHP – just not sure how to copy that folder
structure and related files to the flash drive without the user having
to know much of anything about computers.  Was hoping there is maybe a
PHP extension that I didn’t know about, but sounds like a client side
is going to be my best bet.

 



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Friday, December 11, 2009 2:39 PM

To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive



 

On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote: 



 
Too much reliance on the user knowing how to extract the files to the flash drive – need something that does it all for them so all they have to do is insert the flash drive on their own computer to store the preformatted presentation and then insert into a prospect’s computer and either a) (preferred) run the presentation via an autoplay command or b) open the presentation.html file.
 
 
Ben
 
 
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Friday, December 11, 2009 2:25 PM

To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive
 
 
On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 
 
Users would be updating data via form input (address, tel, product

catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
their own presentations and saving those presentations to a flash drive as
HTML files with calls to the images/PDFs so that they can simply plug their
drive into a USB port and present the info on the road, regardless of
connection to the internet.
Ben
-Original Message-
From: Roberto [mailto:prof...@gmail.com] 
Sent: Friday, December 11, 2009 11:58 AM

To: Ben Miller
Cc: php-general@lists.php.net
Subject: Re: [PHP] Backup to local drive
Hi,
you lost me a bit. Let say a user uploads a PDF file to one of your servers.
What do you mean when you say I want the users to be able to save the
HTML output of their data?!?
Roberto Aloi
http://aloiroberto.wordpress.com
Twitter: @prof3ta
On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:


Hello - I have an application I'm building that allows users to store
personal information and files (images, PDFs, etc.) in our database, but I
need a way for them to be able to save the HTML output of that personal
  

data


to a local (for the user) flash drive.  I'm guessing I'm going to need a
clientSide language like javascript for this, but was wondering if maybe
there was a PHP addon or something like that for downloading content to
  

the


user's PC.  Thanks in advance.



Ben


  
 
 
 
 
Why not create all the HTML files and images on the server, and zip it up then send that down to the user?
 
 
Thanks,

Ash
http://www.ashleysheridan.co.uk
 
 
 
 




That could end up in a lot of HTML and image files. Also, if you can't
rely on people to unzip a file, can you rely on them to know that they
need to keep the images with the HTML?

Thanks,
Ash
http://www.ashleysheridan.co.uk





 






PHP can't do anything like that, PHP is all on the server. Javascript
doesn't have anything like that either, but JScript and VBScript do I
believe, although that limits you to only Internet Explorer, and only if
the user has allowed the unsafe actions.

Your best bet is to maybe try to use a format that keeps it all in one
file, such as a PDF.

Another solution would be to have the HTML reference the images from
your own hosting, and put the entire presentation in one file.

Thanks,
Ash
http://www.ashleysheridan.co.uk



  


Re: [PHP] Backup to local drive

2009-12-11 Thread Ashley Sheridan
On Fri, 2009-12-11 at 16:52 -0600, Joseph Thayne wrote:

 PHP cannot create a folder structure on your local machine.  I don't 
 think Javascript or VBScript can either.  Your best bet is with the zip 
 files.  Windows users have it fairly simple actually (as much as I hate 
 to admit it) as all they would have to do is right-click and Extract.  
 You can always include instructions in either an on-screen format or a 
 README file (or both). 
 
 As I have been thinking about it, you are going to need to do a zip file 
 so that the user only has to download a single file.
 
 Joseph
 
 Ashley Sheridan wrote:
  On Fri, 2009-12-11 at 15:04 -0700, Ben Miller wrote:

  That’s exactly why I need something that will put all the needed files
  directly onto the flash drive – to take that responsibility away from
  the user.  Pulling the data from the DB and creating the folder
  structure is easy with PHP – just not sure how to copy that folder
  structure and related files to the flash drive without the user having
  to know much of anything about computers.  Was hoping there is maybe a
  PHP extension that I didn’t know about, but sounds like a client side
  is going to be my best bet.
 
   
 
 
  From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
  Sent: Friday, December 11, 2009 2:39 PM
  To: Ben Miller
  Cc: 'Roberto'; php-general@lists.php.net
  Subject: RE: [PHP] Backup to local drive
 
 
 
   
 
  On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote: 
 
 
   
  Too much reliance on the user knowing how to extract the files to the 
  flash drive – need something that does it all for them so all they have to 
  do is insert the flash drive on their own computer to store the 
  preformatted presentation and then insert into a prospect’s computer and 
  either a) (preferred) run the presentation via an autoplay command or b) 
  open the presentation.html file.
   
   
  Ben
   
   
  From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
  Sent: Friday, December 11, 2009 2:25 PM
  To: Ben Miller
  Cc: 'Roberto'; php-general@lists.php.net
  Subject: RE: [PHP] Backup to local drive
   
   
  On Fri, 2009-12-11 at 14:25 -0700, Ben Miller wrote: 
   
  Users would be updating data via form input (address, tel, product
  catalogues, etc.) as well as uploading files (images, PDFs, etc.), creating
  their own presentations and saving those presentations to a flash drive as
  HTML files with calls to the images/PDFs so that they can simply plug their
  drive into a USB port and present the info on the road, regardless of
  connection to the internet.
  Ben
  -Original Message-
  From: Roberto [mailto:prof...@gmail.com] 
  Sent: Friday, December 11, 2009 11:58 AM
  To: Ben Miller
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] Backup to local drive
  Hi,
  you lost me a bit. Let say a user uploads a PDF file to one of your 
  servers.
  What do you mean when you say I want the users to be able to save the
  HTML output of their data?!?
  Roberto Aloi
  http://aloiroberto.wordpress.com
  Twitter: @prof3ta
  On Fri, Dec 11, 2009 at 6:44 PM, Ben Miller biprel...@gmail.com wrote:
  
  Hello - I have an application I'm building that allows users to store
  personal information and files (images, PDFs, etc.) in our database, but I
  need a way for them to be able to save the HTML output of that personal

  data
  
  to a local (for the user) flash drive.  I'm guessing I'm going to need a
  clientSide language like javascript for this, but was wondering if maybe
  there was a PHP addon or something like that for downloading content to

  the
  
  user's PC.  Thanks in advance.
 
 
 
  Ben
 
 

   
   
   
   
  Why not create all the HTML files and images on the server, and zip it up 
  then send that down to the user?
   
   
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
   
   
   
   
 
 
 
  That could end up in a lot of HTML and image files. Also, if you can't
  rely on people to unzip a file, can you rely on them to know that they
  need to keep the images with the HTML?
 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 
 
 
   
 
 
  
 
  PHP can't do anything like that, PHP is all on the server. Javascript
  doesn't have anything like that either, but JScript and VBScript do I
  believe, although that limits you to only Internet Explorer, and only if
  the user has allowed the unsafe actions.
 
  Your best bet is to maybe try to use a format that keeps it all in one
  file, such as a PDF.
 
  Another solution would be to have the HTML reference the images from
  your own hosting, and put the entire presentation in one file.
 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 



VBScript and JScript can definitely do it, as I've done something
similar before. Javascript may not be able to. Don't confuse JScript
with Javascript! One is for IE, the other is for everything else!

Thanks,
Ash
http://www.ashleysheridan.co.uk