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 [mail

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

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\)
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 - 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
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

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