Re: [PHP] downloading winword & mp3 files the fancy way through a browser

2009-08-26 Thread hack988 hack988
All IE has a bug for download file so.:) see this http://support.microsoft.com/default.aspx?scid=kb;en-us;308090 some unkown mime type also display in IE no popup a download window 2009/8/26 Ryan Cavicchioni : > On Wed, Aug 26, 2009 at 03:38:27PM +0200, Grega Leskov??ek wrote: >> I tried to downlo

Re: [PHP] downloading winword & mp3 files the fancy way through a browser

2009-08-26 Thread Ryan Cavicchioni
On Wed, Aug 26, 2009 at 03:38:27PM +0200, Grega Leskov??ek wrote: > I tried to download the file from another server the fancy way in PHP, but > it just display blank screen. Can You please look at my code: If it helps, here is some code that I dug up from an old project: I would also verify th

Re: [PHP] downloading winword & mp3 files the fancy way through a browser

2009-08-26 Thread Jim Lucas
Grega Leskovšek wrote: > I tried to download the file from another server the fancy way in PHP, but > it just display blank screen. Can You please look at my code: > > $filepath = "http://aa.yolasite.com/resources/happytears.doc";; > // $filepath = "http://users.skavt.net/~gleskovs/else/h

Re: [PHP] downloading winword & mp3 files the fancy way through a browser

2009-08-26 Thread Ryan Cavicchioni
On Wed, Aug 26, 2009 at 03:38:27PM +0200, Grega Leskov??ek wrote: > I tried to download the file from another server the fancy way in PHP, but > it just display blank screen. Can You please look at my code: > > $filepath = "http://aa.yolasite.com/resources/happytears.doc";; Try using a lo

Re: [PHP] downloading xls files corrupts them

2009-01-12 Thread ceo
For starters, three calls to header("Content-type: "); is just plain silly :-) Read this for sure: http://php.net/header You may find this interesting, or not, to pick the right Content-type http://richardlynch.blogspot.com/2006/06/php-downloads-content-disposition.html -- PHP Genera

RE: [PHP] Downloading file from local network machine

2008-12-08 Thread Mayer, Jonathan
December 2008 20:23 To: Mayer, Jonathan Cc: Wolf; php-general@lists.php.net Subject: RE: [PHP] Downloading file from local network machine On Fri, 2008-12-05 at 17:32 +, Mayer, Jonathan wrote: > Thanks Wolf :) > > Yup, I had considered that, although there could be up to 8 differen

Re: [PHP] Downloading file from local network machine

2008-12-05 Thread Ashley Sheridan
gt; > > > > -Original Message- > > > From: Wolf [mailto:[EMAIL PROTECTED] > > > Sent: 05 December 2008 17:29 > > > To: Mayer, Jonathan; php-general@lists.php.net > > > Subject: Re: [PHP] Downloading file from local network machine > > >

RE: [PHP] Downloading file from local network machine

2008-12-05 Thread Manuel Lemos
Hello Jonathan, On Fri, 2008-12-05 at 17:32 +, Mayer, Jonathan wrote: > Thanks Wolf :) > > Yup, I had considered that, although there could be up to 8 different servers > so that's 8 seperately mapped drives. > > If that's the simplest/neatest way, I'll do that, although I did wonder > wh

Re: [PHP] Downloading file from local network machine

2008-12-05 Thread Bastien Koert
cember 2008 17:29 > > To: Mayer, Jonathan; php-general@lists.php.net > > Subject: Re: [PHP] Downloading file from local network machine > > > > > > > I would like to present users to our internal intranet with a link to > > > download a file from a folder o

RE: [PHP] Downloading file from local network machine

2008-12-05 Thread Ashley Sheridan
I did wonder > whether there was some other clever another way around it. > > -Original Message- > From: Wolf [mailto:[EMAIL PROTECTED] > Sent: 05 December 2008 17:29 > To: Mayer, Jonathan; php-general@lists.php.net > Subject: Re: [PHP] Downloading file from local net

RE: [PHP] Downloading file from local network machine

2008-12-05 Thread Mayer, Jonathan
riginal Message- From: Wolf [mailto:[EMAIL PROTECTED] Sent: 05 December 2008 17:29 To: Mayer, Jonathan; php-general@lists.php.net Subject: Re: [PHP] Downloading file from local network machine > I would like to present users to our internal intranet with a link to > download a file from a

Re: [PHP] Downloading file from local network machine

2008-12-05 Thread Wolf
> I would like to present users to our internal intranet with a link to > download a file from a folder on a different machine on our local > network (such as \\computername\folder\file) Map the drive to the server so that it is accessible as /folder/file on the website. Voila, no more prob

RE: [PHP] Downloading a file

2008-07-16 Thread Robbert van Andel
("none") before session_start resolved the problem (http://bytes.com/forum/thread554529.html) Robbert From: Tom Chubb [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2008 1:41 AM To: Robbert van Andel Cc: php-general@lists.php.net Subject: Re: [PHP] Downloading a file On 16/0

Re: [PHP] Downloading a file

2008-07-16 Thread Tom Chubb
On 16/07/2008, Robbert van Andel <[EMAIL PROTECTED]> wrote: > > I am having trouble getting a file to download to work in Internet > Explorer. > The site works fine in FireFox. The page retrieves the contents of a file > from a database and outputs the following > > > > > > > header("Content-typ

Re: [PHP] Downloading PHP 521

2007-08-07 Thread Richard Lynch
On Fri, August 3, 2007 10:47 am, WyleySam wrote: > Exactly where does one go to download PHP 521, not 523, not 522 but > 521??? > Every link I clicked on at http://www.php.net/ took me to 523, which I > don't > want. Did you try the links on this page: http://www.php.net/releases/ -- Some peopl

Re: [PHP] Downloading PHP 521

2007-08-03 Thread Jim Lucas
WyleySam wrote: Exactly where does one go to download PHP 521, not 523, not 522 but 521??? Every link I clicked on at http://www.php.net/ took me to 523, which I don't want. http://us3.php.net/get/php-5.2.1.tar.gz/from/this/mirror -- Jim Lucas "Some men are born to greatness, some achiev

Re: [PHP] Downloading PHP 521

2007-08-03 Thread Stut
WyleySam wrote: Exactly where does one go to download PHP 521, not 523, not 522 but 521??? Every link I clicked on at http://www.php.net/ took me to 523, which I don't want. http://museum.php.net/php5/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscri

RE: [PHP] Downloading PHP 521

2007-08-03 Thread Uber Wannabe
http://www.php.net/releases/ -- N/A -Original Message- From: WyleySam [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 10:47 AM To: php-general@lists.php.net Subject: [PHP] Downloading PHP 521 Exactly where does one go to download PHP 521, not 523, not 522 but 521??? Every lin

Re: [PHP] downloading an image

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 8:10 am, Ross wrote: > tthe image does not display although it exists in the table 'images' > > > This calls the download script > > > $property_id = $_SESSION['property_id'] ; > $query = "SELECT * FROM images WHERE property_id='$property_id'"; > $result = mysql_query($que

Re: [PHP] downloading an image

2007-04-11 Thread Jochem Maas
Ross wrote: > tthe image does not display although it exists in the table 'images' > > > This calls the download script > > > $property_id = $_SESSION['property_id'] ; > $query = "SELECT * FROM images WHERE property_id='$property_id'"; > $result = mysql_query($query); > while($row = mysql_fe

RE: [PHP] downloading an image

2007-04-11 Thread Jay Blanchard
[snip] tthe image does not display although it exists in the table 'images' [/snip] http://www.google.com/search?hl=en&q=display+image+from+blob+PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Downloading a binary file

2007-01-11 Thread Miguel J. Jiménez
El Thu, 11 Jan 2007 14:59:36 -0500 "Sugrue, Sean" <[EMAIL PROTECTED]> escribió: > I need download a binary file in php. I don't need to read the > contents just download the whole file to a browsed directory. > I know you can use the header function, does anyone know the syntax. > > Sean > May

Re: [PHP] Downloading a binary file

2007-01-11 Thread Stut
estion for the tenth time this month. That's all I'm saying. -Stut -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Thursday, January 11, 2007 3:03 PM To: Sugrue, Sean Cc: php-general@lists.php.net Subject: Re: [PHP] Downloading a binary file Sugrue, Sean w

Re: [PHP] Downloading a binary file

2007-01-11 Thread Stut
Sugrue, Sean wrote: I need download a binary file in php. I don't need to read the contents just download the whole file to a browsed directory. I know you can use the header function, does anyone know the syntax. Please, for the love of $DEITY, check the archives before posting. This particul

Re: [PHP] Downloading utf-8 encoded files

2006-12-26 Thread Bernhard Zwischenbrugger
Hi Try this: There shouldn't be a character encoding problem with this two lines. Don't forget the mime type: http://earth.google.com/support/bin/answer.py?answer=25094&topic=1139 bernhard Am Dienstag, den 26.12.2006, 17:22 +0500 schrieb Fahad Pervaiz: > I want to download UTF-8 encoded kml f

Re: [PHP] Downloading of PgSQL data for use local (crappy subject line)

2006-08-18 Thread Richard Lynch
For LARGE datasets, CSV or tab-delimited transfers are probably going to be easiest to suck in to the DB. Another option is to just use pg_dump, if you want whole tables. Otherwise, honestly, I'd suggest you just export your data to RSS or XML and let the user choose how to open it up. Even CSV

Re: [PHP] Downloading page

2006-06-30 Thread nicolas figaro
BBC a écrit : Hi all... I'm interesting in a page (using PHP script) in internet, and I'd like to download that page with the complete script. the question is: Can I..? Hi, you can't directly. you have to ask the webmaster of the site. but the source code won't be helpfull if the script req

Re: [PHP] Downloading page

2006-06-30 Thread Stut
BBC wrote: Hi all... I'm interesting in a page (using PHP script) in internet, and I'd like to download that page with the complete script. the question is: Can I..? and How..? thank for your input... No you can't. And I thank $DEITY for that. If you really want the source code contact th

Re: [PHP] Downloading very large files

2006-02-14 Thread Curt Zirzow
On Mon, Feb 13, 2006 at 03:27:32PM -0700, Jonathan Duncan wrote: > I have an application that delivers files to the client browser. These > files a very large video files. 250mb+ each. I have two options: 1) I > could have PHP deliver the file with "fread", or 2) I could have PHP > present a

Re: [PHP] Downloading very large files

2006-02-13 Thread Joe Wollard
Jonathan, Not sure how you're using fread, but here's a slightly modified version of what's in the manual that might help: If my understanding of this code is correct you won't be trying to load the entire file into memory and you're not trying to store the file in a variable. All that this sho

Re: [PHP] Downloading very large files

2006-02-13 Thread Jonathan Duncan
Thank you for the input. For now we are just using PHP to create symbolic links to the video files and the links are removed when they are done viewing the video. We are open to other suggest still, but for now, this fills our needs and bypasses putting so much stress on PHP as to put hundred

Re: [PHP] Downloading very large files

2006-02-13 Thread Rory Browne
I've seen this problem many times before, but I'm not sure what solution was found. Possible solutions: Encrypt the file, make it publicly available, and then give the right people the encryption key. Put it behind a .htaccess file allowing only the IP of the correct person - remove the .htacces

Re: [PHP] downloading files

2005-05-05 Thread Greg Donald
On 5/5/05, Cima <[EMAIL PROTECTED]> wrote: > i've uploaded some files into my postgresql db, via a php script, and now > id like to give a user the posibility to download these files via a php > script. what would be the best way to do this bearing in mind that the files > are 'integrated' into th

Re: [PHP] downloading file and displaying HTML

2005-01-20 Thread Richard Lynch
Michael Grunewalder wrote: > I have a list of files that are outside the web root and can't be accessed > with a > URL directly. > If a user clicks the link for a file on the download page, I would like to > send > that file to the browser as a download *and* display HTML in the browser > window. >

Re: [PHP] Downloading Images

2005-01-13 Thread Jochem Maas
John Camp wrote: I was able to successfully make a very simple http proxy - turns out the php documentation has the code for this =] - but now I need a way to display images. I figured the best way would be to download the images to a temporary folder, then parse the html to point to the images

Re: [PHP] Downloading Images

2005-01-13 Thread Greg Donald
On Wed, 12 Jan 2005 22:14:35 -0600, John Camp <[EMAIL PROTECTED]> wrote: > I was able to successfully make a very simple http proxy - turns out the > php documentation has the code for this =] - but now I need a way to > display images. I figured the best way would be to download the images > to a

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Curt Zirzow
* Thus wrote Robin Getz: > Curt Zirzow [EMAIL PROTECTED] wrote: > >> replaced: > >> readfile($name); > >> with: > >> $fp = fopen($name, 'rb'); > >> fpassthru($fp); > > > >The only difference between readfile() and fpassthru() is what parameters > >you pass it. > > > >Something else is the pr

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Robin Getz
OK, I checked things out, and based on some private emails, and pointers, from Francisco M. Marzoa [EMAIL PROTECTED], I have now replaced: readfile($name); with: while(!feof($fp)) { $buf = fread($fp, 4096); echo $buf; $bytesSent+=strlen($buf);/* We know how many

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Klaus Reimer
Robin Getz wrote: The same problem exists with fpassthru (now that I have let it run a little longer) I now have 5 sleeping httpd processes on my system that are consuming 200Meg each. Any thoughts? Ok, so much for the theory. What about the output buffering? Have you checked if you have output

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Robin Getz
Curt Zirzow [EMAIL PROTECTED] wrote: > replaced: > readfile($name); > with: > $fp = fopen($name, 'rb'); > fpassthru($fp); The only difference between readfile() and fpassthru() is what parameters you pass it. Something else is the problem, what version of php are you running? I am using php

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Curt Zirzow
* Thus wrote Robin Getz: > Klaus Reimer [EMAIL PROTECTED] wrote: > >If this theory is true, you may try fpassthru(). > > replaced: > readfile($name); > with: > $fp = fopen($name, 'rb'); > fpassthru($fp); The only difference between readfile() and fpassthru() is what parameters you pass it.

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Greg Donald
On Thu, 04 Nov 2004 08:22:18 -0800, Robin Getz <[EMAIL PROTECTED]> wrote: > and now I don't loose 250 Meg of memory every time I download a 250Meg > file. If someone wants to add this to the readfile() php manual - great. Anyone can post user comments in the manual. Give it a shot. -- Greg Do

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Robin Getz
Klaus Reimer [EMAIL PROTECTED] wrote: If this theory is true, you may try fpassthru(). replaced: readfile($name); with: $fp = fopen($name, 'rb'); fpassthru($fp); and now I don't loose 250 Meg of memory every time I download a 250Meg file. If someone wants to add this to the readfile() php m

Re: [PHP] Downloading Large (100M+) Files

2004-11-04 Thread Klaus Reimer
Robin Getz wrote: The issue is that readfile writes it to the output buffer before sending it to the client. Are you sure you HAVE output buffering? What does ob_get_level() return? If it returns 0 then you don't have output buffering. My theory (and it's only a theory) is, that readfile may no

Re: [PHP] Downloading a part of a file

2004-09-07 Thread zareef ahmed
Hi Rasnita, What you excatly want to do? if you just want to get a remote file. You can use normal file functions like fopen, fget, fgets, file_get_contents etc. with a url. http://in.php.net/manual/en/ref.filesystem.php and if you want to send headers to a server using curl can be a solut

Re: [PHP] downloading files

2004-08-23 Thread Aaron Todd
I did exactly what you said but its not working for me. I am getting the following error: Warning: filesize(): SAFE MODE Restriction in effect. The script whose uid is 20373 is not allowed to access /var/www owned by uid 0 in /home/virtual/site341/fst/var/www/html/test.php on line 3 I checked

Re: [PHP] downloading files

2004-08-20 Thread Ramil Sagum
Aaron Todd wrote: I have been using the following code to try to make it work: The webroot of my site is at: /var/www/html So far this will create a new file on my computer where ever I want, but it does not download the contents of the file. Any suggestions? Thanks, Aaron It seems that PHP can

Re: [PHP] downloading files

2004-08-20 Thread Aaron Todd
I have been using the following code to try to make it work: The webroot of my site is at: /var/www/html So far this will create a new file on my computer where ever I want, but it does not download the contents of the file. Any suggestions? Thanks, Aaron "Octavian Rasnita" <[EMAIL PROTECT

Re: [PHP] downloading files

2004-08-19 Thread Octavian Rasnita
You can put the files that need to be downloaded in a directory somewhere outside of the web server root, but in that case your PHP program will need to read the file and print it to the browser, and it will also need printing the HTTP headers: Content-type: application/octet-stream Content-dispos

Re: [PHP] downloading files

2004-08-19 Thread Mattias Thorslund
Aaron Todd wrote: I posted a simular question before and never really got an answer. The post drifted off into some other valuable information, but I still have the same question. I am trying to create a site with file downloads. The files on the server that are to be downloaded need to be protec

Re: [PHP] downloading files

2004-08-19 Thread Mario Micklisch
Hi Aaron, [..] The download files are in a directory protected by htaccess which it is my understanding that PHP can go underneath htaccess to get access to the files. My problem is where do I put this directory? I was already told to put it outside the web root directory, [..] Both are goo

RE: [PHP] Downloading MySQL Files

2003-11-10 Thread Erik Osterman
Urldecode(..) may not be binary safe. I'm not sure exactly what type of content it is you are storing in the database for 'fdata', but it sounds like you're misusing urlencode/urldecode. In short, urlencode(..)/urldecode(..) are for encoding URLs and are not the appropriate way to escape binary dat

Re: [PHP] Downloading MySQL Files

2003-11-10 Thread John Hicks
On Monday 10 November 2003 08:07 pm, Stephen Craton wrote: > I have a database which keeps some normal files in > LONGBLOBS. I then call up a file called download.php > to retrieve the file from the database, echo out > it’s contents, and it’s type, and all that so they > download it. > However,

RE: [PHP] Downloading MySQL Files

2003-11-10 Thread Stephen Craton
ECTED] Sent: Monday, November 10, 2003 8:31 PM To: Stephen Craton Subject: Re: [PHP] Downloading MySQL Files On Monday 10 November 2003 08:07 pm, Stephen Craton wrote: > I have a database which keeps some normal files in > LONGBLOBS. I then call up a file called download.php > to retrieve the

Re: [PHP] downloading a file using headers

2003-07-30 Thread Jason Sheets
You could use an iframe or you could turn on output buffering, when output buffering is enabled you can send headers after normal output has been sent. Just do ob_start(); at the top of your script. Not the most elegant way of doing it but it would work and not require you to use an iframe.

Re: [PHP] downloading a file using headers

2003-07-30 Thread Curt Zirzow
* Thus wrote Amanda McComb ([EMAIL PROTECTED]): > I have a page that queries the database then uses the data to build an > excel spreasheet. THat spreadsheet is downloaded according to info in the > headers. My manager wants to put the page inside of another HTML page to > make it prettier, but t

Re: [PHP] downloading a file using headers

2003-07-30 Thread CPT John W. Holmes
> I have a page that queries the database then uses the data to build an > excel spreasheet. THat spreadsheet is downloaded according to info in the > headers. My manager wants to put the page inside of another HTML page to > make it prettier, but then it breaks because headers are already writte

Re: [PHP] Downloading a file.

2003-06-12 Thread Dustin Pate
"Jeff Harris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Jun 11, 2003, "Alex Earl" claimed that: > > |> Does anyone know what to do to make it saved as: mysoft-1.0-truc.zip > |> > |> And I would like to display a page telling "Thanks for download" or > |> something...but if I

Re: [PHP] Downloading a file.

2003-06-11 Thread Jeff Harris
On Jun 11, 2003, "Alex Earl" claimed that: |> |> If he wants to download, in the file downloadit.php, there is: |> header("Content-type: application/octet-stream\n"); |> header("Content-Disposition: attachment; filename=mysoft-1.0-truc.zip"); |> header('Cache-Control: public'); |> header("Content-

Re: [PHP] Downloading a file.

2003-06-11 Thread Alex Earl
> > If he wants to download, in the file downloadit.php, there is: > header("Content-type: application/octet-stream\n"); > header("Content-Disposition: attachment; filename=mysoft-1.0-truc.zip"); > header('Cache-Control: public'); > header("Content-transfer-encoding: binary\n"); > header("Content-l

Re: [PHP] Downloading PHP

2003-06-07 Thread Rasmus Lerdorf
Try a different mirror. On Sat, 7 Jun 2003 [EMAIL PROTECTED] wrote: > Hello All, > I have a problem with downloading new PHP 4.3.2. Whenever > I try to download it from whichever mirror I got a HTTP 404 error. > Could someone tell why? > > Thanks Milan > > > -- > PHP G

Re: [PHP] downloading XML file

2003-06-03 Thread Marek Kilimajer
header('Content-type: application/octet-stream'); Sichta Daniel wrote: Hi, cfg: php 4.2.3, IIS5.1 I have generated link (from MySQL database) on my web sile, which suppose to allow user to dowload xml file. How can I do this because when I'm just adding name of the file to the href then it will

Re: [PHP] Downloading files outside the webserver

2003-03-05 Thread Daniel Silva
The problem was solved. I added a call to the exit() construct at the end of the function and haven't had any more problems since. I would like to thank everyone who helped me. Cheers, Daniel "Daniel Silva" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello. > > I tried what y

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
Hello. I tried what you suggested and it's working alright. The problem is, that it doesn't always work. I adapted your suggestion to what I needed. Instead of creating a file, I made a fuction that does basically the same. All listed files are links that enable the user to download them. So far

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
There's actually a function in (PHP 4 >= 4.3.0) that returns a file's MIME type. Here it is: string mime_content_type ( string filename) "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yes, sure, but you many times won't know the mime type and might be > forced to

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Marek Kilimajer
Yes, sure, but you many times won't know the mime type and might be forced to use application/octet-stream. You can do if(dirname(realpath($user_files_dir . $_GET['filename'])) == $user_files_dir) as a security check Daniel Silva wrote: That is a very nice solution, the problem is, the files ar

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Daniel Silva
That is a very nice solution, the problem is, the files are stored on disk, not on the DB. I suppose it can be addapted to work with the disk, can't it? Cheers, Daniel "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > create a download php file: > > > $res=mysql_q

Re: [PHP] Downloading files outside the webserver

2003-03-04 Thread Marek Kilimajer
create a download php file: $res=mysql_query("select * from user_files where filename='$GET['file']'"); if($res && mysql_num_rows($res)) { $file=mysql_fetch_assoc($res); if($_GET['downaload']) { header('Content-Type: application/octet-stream'); header('Content-disposition: a

Re: [PHP] Downloading files - Plz hlp

2003-02-23 Thread Ernest E Vogelsinger
At 00:52 24.02.2003, Anthony Rodriguez said: [snip] >In PHP, is there a way to allow the user to download a demo file (e.g.: >sample.exe) to their computer? And, then, automatically return to the Web >site? [snip] A

Re: [PHP] Downloading files

2003-02-23 Thread Justin French
on 24/02/03 1:01 AM, Anthony Rodriguez ([EMAIL PROTECTED]) wrote: > In PHP, is there a way to allow the user to download a file (e.g.: > sample.txt) to their computer? And, then, automatically return to the > PHP-generated Web page. why do you need to re-run the page? it can be done with a bit o

Re: [PHP] Downloading File rather then Executing

2003-02-08 Thread Stephen Craton
t; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 08, 2003 1:51 PM Subject: Re: [PHP] Downloading File rather then Executing > On Sunday 09 February 2003 02:46, Stephen Craton wrote: > > > Got a problem. For some reason, when I try to view a PHP

Re: [PHP] Downloading File rather then Executing

2003-02-08 Thread Jason Wong
On Sunday 09 February 2003 02:46, Stephen Craton wrote: > Got a problem. For some reason, when I try to view a PHP file on my server, > it wants to download the file rather then open and execute. I have no > control over my server so what should I do? > > Here's a sample URL: > > http://d2mods.xfe

RE: [PHP] Downloading Files

2002-06-25 Thread John Holmes
> I want to protect files from being downloaded and only allow people to > download files which they have access too. I've done all the access > control > etc... but whats the best way for the user to download the file... Can you > "paste" the file directly into the header? (get the file from the

Re: [PHP] Downloading Files

2002-06-25 Thread Francis
got it!! :) $filename = "backup.tar"; $download_file = "/absolute/path/backup.tar"; $fh = fopen("$download_file", "r"); header("Content-Type: application/x-tar"); header("Content-Disposition: attachment; filename=$filename"); fpassthru($fh); exit(); Thanks a lot!! :) "Justin French" <[EMAIL PRO

Re: [PHP] Downloading Files

2002-06-25 Thread Justin French
Either of these options will work fine. There was MASSIVE disscussions about this a few weeks back -- check for threads started by myself in the archives. Justin French on 26/06/02 12:35 AM, Francis ([EMAIL PROTECTED]) wrote: > I want to protect files from being downloaded and only allow pe

Re: [PHP] Downloading files

2002-04-09 Thread Jason Wong
On Wednesday 10 April 2002 08:54, Jim Koutoumis wrote: > Using this method,.. works OK if you choose to save the file, however if > you choose to open the file you get a weird behaviour where IE says it > can't find the file and a subsequent prompt to create a new one. Does > anyone know why it do

Re: [PHP] Downloading files

2002-04-09 Thread Jim Koutoumis
Using this method,.. works OK if you choose to save the file, however if you choose to open the file you get a weird behaviour where IE says it can't find the file and a subsequent prompt to create a new one. Does anyone know why it does this and how to overcome it ? At this stage I've resorted t

Re: [PHP] Downloading files

2002-04-09 Thread Scott Houseman
Try this: As you give the client Content-Type: application/save-as - it will not know what mime type the file is, and the browser will give the user a save-as prompt. This works in explorer - I haven't checked it in Mozilla etc - so you might have to tweak it a bit. Cheers Scott - Origina

Re: [PHP] Downloading files

2002-04-09 Thread Matt Williams
On Tuesday 09 April 2002 11:20, Declan Kenny wrote: > Hi folks, > > Ok I am trying to make a download area for files (including word files). > How do I force a download of a word document rather than have it opening in > IE? > > Declan You don't. This option is set in windows exploror. as part o

Re: [PHP] downloading text files stored in database?

2002-02-25 Thread Lee P Reilly
Hi, Thanks for your help, but that assumes that file is (at least temporarily) stored on disc - I'd like to take the file data straight out of the database and be available for "download" by the user. Is this possible at all, or will I have to create a temporary file to hold the data, and *then*

Re: [PHP] downloading text files stored in database?

2002-02-25 Thread Ivan Balazs
In the download_file.php put a header() function which redirects the browser to the file, like header("Location: test.dat"). After that it should show the dialog screen. Balazs On Mon, 25 Feb 2002, Lee P Reilly wrote: > Hi, > > I wonder if someone can point me in the direction of an example and

Re: [PHP] downloading images

2001-10-29 Thread Richard S. Crawford
With some of the newer broswers, you may be able to re-define the functionality of the context menu via JavaScript. Visit http://www.dynamicdrive.com; I think that there are some examples there, and you might be able to redirect the "save image as..." functionality there (I wouldn't count on

Re: [PHP] Downloading Images

2001-10-04 Thread _lallous
I suggest you call: readfile() instead of include() at the end of your script! "David Otton" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote: > > >I have added a download button to a web-site that > >enables us

Re: [PHP] Downloading Images

2001-10-04 Thread David Otton
On Thu, 4 Oct 2001 07:51:59 -0700 (PDT), you wrote: >different length, (3k as opposed to the original 9k) I >originally did have an error message appended to the >downloaded image but that no longer appears to be the >case. However the image is definitely truncated. Any All the JPEGs I have here

Re: [PHP] Downloading Images

2001-10-04 Thread Roger Bryant
Hi Dave, Thanks for you prompt response. The Image is indeed a different length, (3k as opposed to the original 9k) I originally did have an error message appended to the downloaded image but that no longer appears to be the case. However the image is definitely truncated. Any ideas why this may

Re: [PHP] Downloading Images

2001-10-04 Thread David Otton
On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote: >I have added a download button to a web-site that >enables users to download images to their local >drives. (I'm using a button as I want to wrap some >logic round this function) I have the following >(simplified code )that will be called from

Re: [PHP] downloading

2001-01-22 Thread Richard Lynch
Maybe -- If php was installed with FTP, you can have it FTP stuff dynamically... Might be easier to log in to the other server and do FTP by hand for just one file though... Don't miss the Zend Web Store's Grand Opening on January 23, 2001! http://www.zend.com Wanna help me out? Like Music?

Re: [PHP] Downloading images through the use of code

2001-01-22 Thread Richard Lynch
>First of all, am I correct in assuming I could download a file and parse it using fopen("url")? Yup. Pretty darn nifty, huh? >Secondly, if I find an IMG tag, how would I go about grabbing the file that is contained in the SRC of that image tag? >Would another simple fopen() and fput() to anoth