[PHP] Re: Converting HTML to PDF via PHP

2010-08-05 Thread Scott Teresi
 I am trying to export generated HTML (an invoice for a customer) to a saveable
 PDF that is downloaded.  Any ideas?

I've found a very easy unix command for generating PDF's:

   code.google.com/p/wkhtmltopdf

[The PHP list wouldn't let me send this with http://; in front of the URL.]

It will turn any web page into a PDF and was easy to install and use and has
documentation. (I call it from a PHP script.) It renders the web page using
a WebKit library that's included in the source, and there are lots of
options for how to tweak the rendering engine.

Scott



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



[PHP] How to upload via SFTP with allow_url_open disabled?

2010-07-29 Thread Scott Teresi
I'm attempting to send a file over SFTP in PHP, but all the examples I find
online do something like this:

   $stream = @fopen(ssh2.sftp://xx;, 'w');
   @fwrite($stream, $data_to_send)

This requires allow_url_fopen to be enabled on the server, to get a stream
for the remote file.

I maintain the server but would like to keep allow_url_fopen disabled. If
I do that, how can I send a file over SFTP?

Thanks for any help people can provide!!

Scott Teresi



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



[PHP] PHP session URL rewriting

2003-10-05 Thread Scott Teresi
I'm having trouble getting PHP's built-in session management to rewrite my
a href= tags to include the session ID across pages when cookies are
disabled. Unfortunately, PHP seems to only add the PHPSESSID to a link if
the page ends in .php, not .html.

I've preferred to hide my .php extensions and simply have Apache execute
all files ending in .html (traffic isn't too heavy on this site). How can
I force PHP to pass the session ID to all URLs, even ones that don't end in
.php?

Thanks for any help or references anyone can provide!

Scott Teresi
--
[EMAIL PROTECTED]

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



[PHP] How can database be exported to Microsoft Access?

2002-11-19 Thread Scott Teresi
I'm looking for a PHP library that would allow me to write in the native
file format of Microsoft Access (.mdb). This would allow me to hand a
copy of a MySQL database to my client. I'm hosted on unix, and I'm not
familiar with ODBC, nor do I have access to MS Access running on a server.

Does something like this exist? I haven't found anything helpful at
HotScripts.com or php.net.

Another possibility might be for me to use PHP's built-in support for .dbf
files. However, my hosting company doesn't use the --enable-dbase flag on
their PHP installation. Also, I've heard that string fields longer than 255
characters can't be exported into a dBase file.

Besides ODBC, is my only option to write a quick tab-delimited export
routine for my data?

Thanks for any helpful advice!

Scott Teresi
[EMAIL PROTECTED]


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




[PHP] Browser upload timeout

2002-11-11 Thread Scott Teresi
I am using a PHP script which allows the user to upload files through a
browser (the script opens an FTP session behind the scenes). The problem is,
all browsers (on Mac and PC platforms) often time out after a random amount
of time, between five minutes and a couple hours or sometimes not at all.
They display a dialog box saying something like the connection was
refused. Usually this means a file can't be uploaded if it's sufficiently
large, say, 5-10 megs.

The browser appears to be waiting for a response from the server during the
upload, which of course doesn't come until the upload is complete.

Has anyone found a way to work around this problem? I suspect that this
problem will occur no matter what scripting language is used, because it's
simply a function of the browser's handling of INPUT TYPE=FILE in a
form. I've already tried setting PHP's max_execution_limit in the php.ini
file, and I use ftp_set_option($connection, FTP_TIMEOUT_SEC, 1);.

Thanks for any help!

Scott Teresi
[EMAIL PROTECTED]


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