Re: [PHP] How to convert a website to a txtfile....?

2002-04-07 Thread heinisch

At 06.04.2002  17:51, you wrote:
Hi!

I have this website with a webshop that customers can order some products.
And when the products are listed up in the cart on the screen, would I like
to get the output
into a new txtfile and save it on the server. Then it is possible to get it
faxed, and that is the goal.

Anyone who has done this before?
Assuming you have a Linux box running,
I did the following, writing the data you got from cart to a .txt file
using fopen(), fputs()
then translate this with a2ps (takes time to get the commandline, so I post 
it here)

a2ps -q -r --footer=nothing -B --borders=1 --font-size=10.0 --tabsize=3
(cutted here, space between -- parameters)
--left-title=Your Title -oout1.ps YourInput.txt

Then use Ghostscript to make a faxfile (as above)
gs -q -dBATCH -sDEVICE=faxg3 -sOUTPUTFILE=send -sPAPERSIZE=a4 -dNOPAUSE out1.ps

then sendfax (package mgetty+sendfax) to send this file
I used sendfax, as it is easy to configure, and the commandline is not so 
big ;-)
the commands to a2ps, gs and sendfax are transmitted via exec()
HTH Oliver


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




Re: [PHP] How to convert a website to a txtfile....?

2002-04-06 Thread Miguel Cruz

On Sat, 6 Apr 2002, Raymond Lilleodegard wrote:
 I have this website with a webshop that customers can order some products.
 And when the products are listed up in the cart on the screen, would I like
 to get the output
 into a new txtfile and save it on the server. Then it is possible to get it
 faxed, and that is the goal.

If it's your web site, you have all the data, so why not just generate the 
text yourself at the same time as you're generating the HTML? You can 
write it to a file or email it to your fax server.

miguel


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




RE: [PHP] How to convert a website to a txtfile....?

2002-04-06 Thread Sebastian A.

You can try using fopen() and fwrite(), they are the primary file
manipulation tools you should use in this instance.

-Original Message-
From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 06, 2002 5:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to convert a website to a txtfile?

Hi!

I have this website with a webshop that customers can order some products.
And when the products are listed up in the cart on the screen, would I like
to get the output
into a new txtfile and save it on the server. Then it is possible to get it
faxed, and that is the goal.

Anyone who has done this before?

Thanks for all help!

Best regards

Raymond Lilleodegard



--
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