Help using HTTP_Download
| From: | Craig H. Anderson | Date: | Mon, 24 Nov 2003 06:41:59 +0000 |
| Subject: | Help using HTTP_Download | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9094@lists.php.net to get a copy of this message | ||
I need some help on how to use the HTTP_Download class.
The following code is in a file download.php.
The download question looks like this:
Open 'http://www.domain.com/download.php'
(attachment)?
[Open] - gets the correnct data.
[Save as] - gets an error box.
Already saving URL
http://www.domain.com/download.php
// code from download.php
$dnld = "String with data to download";
$params = array();
$params['data'] = $dnld;
$params['contenttype'] = "Content-Type: text/tab-separated-values;
charset=ISO-8859-1";
$params['contentdisposition'] = "Content-Disposition: attachment;
filename=contacts.tsv";
$http_dnld = new HTTP_Download($params);
$http_dnld->send();