Results 1 to 5 of 5

Thread: [RESOLVED] Downloading Files without download dialog box

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    54

    Resolved [RESOLVED] Downloading Files without download dialog box

    Hi all,

    i m trying to know whether there is any way to force the user to download file to a predefine fixed path , without showing the download dialog box.

    i have done the following, but it shows the download dialog box to user.

    header("Content-type: application/audio");
    header("Content-Length: " . $m_filesize );
    header("Content-Disposition: attachment; filename=" .$rs->fields(0,"filename") );

    $filename = $m_tmppath;
    $handle = fopen ($filename, "r");
    $contents = fread ($handle, filesize ($filename));
    fclose ($handle);
    echo $contents;

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Downloading Files without download dialog box

    This is not possible, it would mean that you could make people download virii, which is obviously a security risk. It can be done with an application that is install on the users computer which interacts with the website. try searching the forum for it as i cannot remember what it is called

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    54

    Re: Downloading Files without download dialog box

    is there any way to make user download more than one file at a time with only one dialog box atleast,


    thanks

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Downloading Files without download dialog box

    Only if you put the files in a ZIP archive.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Downloading Files without download dialog box

    Quote Originally Posted by visualAd
    Only if you put the files in a ZIP archive.
    This thread is usefull if you want to create ZIP files using PHP on-the-fly.

    http://www.vbforums.com/showthread.p...&highlight=ZIP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width