RE: [PHP] Download Script

2004-08-27 Thread Ivo Pletikosic
--- > From: Aaron Todd [mailto:[EMAIL PROTECTED] > Sent: Friday, August 27, 2004 11:35 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Download Script > > > I've created a download script that works quite nicely. The > only issue with > it is that when I download a fil

[PHP] Download Script

2004-08-27 Thread Aaron Todd
I've created a download script that works quite nicely. The only issue with it is that when I download a file where the file name is like "filename v1.0.2.1.exe" there is some extra characters added into the name when it is downloaded. So that file will be "filename v1[1].0.2.1.exe". I am wo

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 que

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

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 Gene

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 potent

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 Mess

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:

Re: [PHP] download script

2004-08-10 Thread John Nichel
Aaron Todd wrote: "; echo basename($file); echo "No File Found"; } ?> Belay my last post...you're using readfile and not fread. Okay, what error is the script outputting? You should remove the '@' from in front of readfile() so that it will output an error if it's the problem. -- John C. N

Re: [PHP] download script

2004-08-10 Thread John Nichel
Aaron Todd wrote: "; echo basename($file); echo "No File Found"; } ?> Where are you opening the file? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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: > > $file = "/home/lgxdlr/test/".$_GET['file'].""; > if (file_exists(base

[PHP] download script

2004-08-10 Thread Aaron Todd
I was going to post another follow-up question in a pending thread here but it seems to have been deleted. Anyway, I am trying to write a download script that will downloaded files from my site. All these files need to be protected so just anybody cant come to the site and download them. I have

[PHP] download script

2004-08-10 Thread Aaron Todd
I was going to post another follow-up question in a pending thread here but it seems to have been deleted. Anyway, I am trying to write a download script that will downloaded files from my site. All these files need to be protected so just anybody cant come to the site and download them. I have

Re: [PHP] download script

2003-01-21 Thread Matt Vos
nge as necessary) Matt - 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 supp

RE: [PHP] download script

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
nal Message- > From: Martin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 22 January 2003 12:50 AM > To: [EMAIL PROTECTED] > Subject: [PHP] download script > > > i need a script that make downloads from files but it must > support resuming for getright and download ace

[PHP] download script

2003-01-21 Thread Martin
i need a script that make downloads from files but it must support resuming for getright and download acelerator pro. Thanks... I have this classic download script , but does not support resuming error_reporting(0); header("Last-Modified: " . gmdate("D, d M Y H:i:s T", filemtime($file

RE: [PHP] Download Script - Newbie Alert

2002-06-04 Thread John Holmes
8 AM > 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 us

Re: [PHP] Download Script - Newbie Alert

2002-06-04 Thread Marek Kilimajer
that leech all our images. Our image file URLs work >*just* long enough for them to build their pages, and test that they look >good. > >30 hours later, all the leeched images are replaced with Images Central >logos. : ) > >Fun! > >-Clay > > > > > >

Re: [PHP] Download Script - Newbie Alert

2002-06-03 Thread Clay Loveless
AIL 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.

RE: [PHP] Download Script - Newbie Alert

2002-06-03 Thread John Holmes
---John Holmes... > -Original Message- > From: Philip Hess [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 03, 2002 6:09 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Download Script - Newbie Alert > > Hello, > > I would like to allow visitors to my site to downl

[PHP] Download Script - Newbie Alert

2002-06-03 Thread Philip Hess
Hello, I would like to allow visitors to my site to download documents created with MS office and .PDF files as well. In order to prevent linking from other sites I'd like to make or modify a script that hides the actual location of the files. A pointer in the right direction would be most ap

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 > bu

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 somef

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($p

[PHP] download script

2001-08-21 Thread AD
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); This works, but when the initial file do