[PHP] Export selected data to a text file

2002-05-03 Thread Miva Guy

I'm brand new to PHP, but very familiar with how to do this in another
language.

I'm want to read a member's record and export the selected data to a
downloadable vCard.

The vCard is simply a text file with a .vcf extension. Once I've read all
the data for that user, I need to create the file line by line with a \r\n
at the end of each.

Example:

BEGIN:VCARD
VERSION:2.1
N:List;PHP;Mailing
FN:PHP Mailing List
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020503T111208Z
END:VCARD

How do I export each line to a text file then move that newly created file
to a web root subdirectory?

Thanks!
Mark

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




Re: [PHP] Export selected data to a text file

2002-05-03 Thread Jason Wong

On Friday 03 May 2002 19:20, Miva Guy wrote:
 I'm brand new to PHP, but very familiar with how to do this in another
 language.

 I'm want to read a member's record and export the selected data to a
 downloadable vCard.

 The vCard is simply a text file with a .vcf extension. Once I've read all
 the data for that user, I need to create the file line by line with a \r\n
 at the end of each.

 Example:

 BEGIN:VCARD
 VERSION:2.1
 N:List;PHP;Mailing
 FN:PHP Mailing List
 EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
 REV:20020503T111208Z
 END:VCARD

 How do I export each line to a text file then move that newly created file
 to a web root subdirectory?

Manual  Filesystem functions

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Boren's Laws:
(1) When in charge, ponder.
(2) When in trouble, delegate.
(3) When in doubt, mumble.
*/

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




Re: [PHP] Export selected data to a text file

2002-05-03 Thread Miguel Cruz

On Fri, 3 May 2002, Miva Guy wrote:
 I'm want to read a member's record and export the selected data to a
 downloadable vCard.
 
 The vCard is simply a text file with a .vcf extension. Once I've read all
 the data for that user, I need to create the file line by line with a \r\n
 at the end of each.
 
 Example:
 
 BEGIN:VCARD
 VERSION:2.1
 N:List;PHP;Mailing
 FN:PHP Mailing List
 EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
 REV:20020503T111208Z
 END:VCARD
 
 How do I export each line to a text file then move that newly created file
 to a web root subdirectory?

Unless you're doing a zillion of these at once, or you expect truly high
levels of downloads, wouldn't you want to just generate these on the fly
and hand them out with the appropriate Content-Type header? Doesn't seem
like there's much point in storing them on disk, as creating them in
memory is very cheap.

miguel


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