RE: [PHP] Download Script

2004-08-27 Thread Ivo Pletikosic
I am wondering if this is my headers that are doing this, but I really dont know. I think its an IE or Windows behavior and what causes it is the multiple dots in the filename. I resorted to naming our downloads filename-v1_0_2_1.exe -Original Message- From: Aaron Todd

Re: [PHP] download script

2004-08-11 Thread zareef ahmed
Hi, Following class may be usefull. http://www.phpclasses.org/browse/package/699.html One Advice :: Please check your script in another browsers too. some Buggy Browser may cause the problems. zareef ahmed --- Aaron Todd [EMAIL PROTECTED] wrote: I was going to post another follow-up

Re: [PHP] download script

2004-08-10 Thread Jason Wong
On Thursday 12 August 2004 01:06, Aaron Todd wrote: I am trying to dowload a file using readfile(), but PHP still cant seem to get to the file. And what exactly does that mean? Any error messages? Here is my code: ?php $file = /home/lgxdlr/test/.$_GET['file'].; if

Re: [PHP] download script

2004-08-10 Thread John Nichel
Aaron Todd wrote: snip ?php $file = /home/dlr/test/.$_GET['file'].; if (file_exists(basename($file))) { header(Content-Description: File Transfer); header(Content-Type: application/force-download); header(Content-Disposition: attachment; filename=.basename($file)); @readfile($file); } else

Re: [PHP] download script

2004-08-10 Thread John Nichel
Aaron Todd wrote: snip ?php $file = /home/dlr/test/.$_GET['file'].; if (file_exists(basename($file))) { header(Content-Description: File Transfer); header(Content-Type: application/force-download); header(Content-Disposition: attachment; filename=.basename($file)); @readfile($file); } else

Re: [PHP] download script

2004-08-10 Thread Aaron Todd
Thanks for your reply, I am not getting an error at all. I have coded some error traping so if the files is not found it will tell you instead of displaying an error. As a test I took all of that out so the script was: $file = /home/dlr/test/.$_GET['file']. header(Content-Description: File

RE: [PHP] download script

2004-08-10 Thread Ed Lazor
The other guys addressed how to get the script working, but I thought I might also mention that you're presenting a potential security hole in your app by not filtering the file name before using it. You'll also want to use the realpath command on the full file name and path. -Original

Re: [PHP] download script

2004-08-10 Thread Aaron Todd
Why would this be a security hole if I do not filter the file name before I use it? Thanks, Aaron Ed Lazor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The other guys addressed how to get the script working, but I thought I might also mention that you're presenting a potential

Re: [PHP] download script

2004-08-10 Thread John W. Holmes
Aaron Todd [EMAIL PROTECTED] wrote in message $file = /home/dlr/test/.$_GET['file'].; Why would this be a security hole if I do not filter the file name before I use it? http://www.yourdomain.com/yourfile.php?file=../../path/to/any/file/on/machine ---John Holmes... -- PHP General

RE: [PHP] download script

2004-08-10 Thread Ed Lazor
A hacker could modify the URL Mypage.php?file=book.pdf Becomes Mypage.php?file=../htdocs/.htaccess -Original Message- From: Aaron Todd [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 11, 2004 11:58 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] download script Why would

RE: [PHP] download script

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
I have never done a script that supports resume but this is the logic you need to follow to work out the protocol behaviour. - Create a download script as per below start downloading then stop the web server. - Change the script to e-mail you the headers from the script request. - Restart the web

Re: [PHP] download script

2003-01-21 Thread Matt Vos
- Original Message - From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] To: 'Martin' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 21, 2003 10:08 AM Subject: RE: [PHP] download script I have never done a script that supports resume but this is the logic you need to follow to work

Re: [PHP] Download Script - Newbie Alert

2002-06-04 Thread Marek Kilimajer
] Organization: U.S. Army Reply-To: [EMAIL PROTECTED] Date: Mon, 3 Jun 2002 20:06:42 -0400 To: 'Philip Hess' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] Download Script - Newbie Alert Store the files above your web root and use a PHP script to control access. Use header to set

RE: [PHP] Download Script - Newbie Alert

2002-06-04 Thread John Holmes
To: PHP Subject: Re: [PHP] Download Script - Newbie Alert You can also check $HTTP_REFERER, it's much simpler Marek Clay Loveless wrote: Something else along these lines -- I really, really wish that more sites that use this method would test across multiple browsers and platforms. I

RE: [PHP] Download Script - Newbie Alert

2002-06-03 Thread John Holmes
Store the files above your web root and use a PHP script to control access. Use header to set the appropriate header for the file, header(Content-Type: application/vnd.ms-excel; name='excel'); header(Content-Disposition: attachment; filename= . $filename . .xls); then use passthru() to send

Re: [PHP] Download Script - Newbie Alert

2002-06-03 Thread Clay Loveless
To: 'Philip Hess' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] Download Script - Newbie Alert Store the files above your web root and use a PHP script to control access. Use header to set the appropriate header for the file, header(Content-Type: application/vnd.ms-excel; name='excel

Re: [PHP] Download script - sometime works sometime not

2001-11-08 Thread Gede
.. Thank you... - Original Message - From: speedboy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 07, 2001 3:16 PM Subject: Re: [PHP] Download script - sometime works sometime not My problem,...this script works with somefile but sometime it does

RE: [PHP] Download script - sometime works sometime not

2001-11-08 Thread Jason Murray
Its works for file .html or.zip or .tar or .tar.gz But it is not for text file.. Could you recommend how I download text file ? What do I have to do in my scripts...? I read the manual about HTTP functionsand search through mailing list about header functions but still

Re: [PHP] download script

2001-08-21 Thread Brad Hubbard
On Wed, 22 Aug 2001 10:19, AD wrote: Hi, I'm working on a download script header(Content-Type: application/octet-stream\n); header(Content-Length: $size\n); header(Content-Disposition: attachment; filename=\$file\\n); header(Content-Description: Download\n); readfile($path.$file);