Re: [PHP] File downloading?

2001-02-28 Thread Christian Reiniger

On Wednesday 28 February 2001 01:06, you wrote:
  Great, thanks.
  I looked at the file(), but it sounded like is was just for
  local file use.

 oops, should've been include(). Sorry :)

include () is surely wrong for that. fpassthru (as someone else 
mentioned), file() and (my personal favourite) readfile() are the 
functions of choice

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

CPU not found. retry, abort, ignore?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] File downloading?

2001-02-27 Thread Jason Murray

 Is it possible to send a file to a browser?

Sure. 

file();

 I would like to allow people to download a file, but I don't 
 want to give away the path to the file, so a normal link 
 wouldn't work.

In that case:

Header("Content-type: application/octet-stream");
file("whatyouwanttosend");

 ( I am not sure if my first email went through, I got an 
 error back about the mailbox being full)

I didn't see it ...

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File downloading?

2001-02-27 Thread Chris


Great, thanks.
I looked at the file(), but it sounded like is was just for local file use.


  Is it possible to send a file to a browser?
 
 Sure. 
 
 file();
 
  I would like to allow people to download a file, but I don't 
  want to give away the path to the file, so a normal link 
  wouldn't work.
 
 In that case:
 
 Header("Content-type: application/octet-stream");
 file("whatyouwanttosend");
 
  ( I am not sure if my first email went through, I got an 
  error back about the mailbox being full)
 
 I didn't see it ...
 
 Jason
 
 -- 
 Jason Murray
 [EMAIL PROTECTED]
 Web Design Team, Melbourne IT
 Fetch the comfy chair!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] File downloading?

2001-02-27 Thread Jason Murray

 Great, thanks.
 I looked at the file(), but it sounded like is was just for 
 local file use.

oops, should've been include(). Sorry :)

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File downloading?

2001-02-27 Thread Chris Lee



?php

  header("Content-Type: application/download ");
  header("Content-Disposition: filename=filename.txt ");
 readfile('/path/to/file.zip');

?

try this, works for me.

everywhere I read they say Im supposed to use application/octlet-stream but
it doesnt allways seem to work in some browsers.

--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]

""Chris"" [EMAIL PROTECTED] wrote in message
044201c0a112$a06e2470$01c8c8c8@ibcserver">news:044201c0a112$a06e2470$01c8c8c8@ibcserver...
Hi,
Is it possible to send a file to a browser?
I would like to allow people to download a file, but I don't want to give
away the path to the file, so a normal link wouldn't work.
I am hoping there is a way to use php to send the file using code, rather
than trying to first copy the file to a temp dir then give them the link,
then worry about deleting the temp dir again.

( I am not sure if my first email went through, I got an error back about
the mailbox being full)

Thanks,
Chris






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]