Results 1 to 3 of 3

Thread: Download Link

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Download Link

    I want to make a website where you can submit downloadable files..... how can you hake a link to download it with HTML?

    Is it even Possible with HTML?

  2. #2
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Just Testing to see if it works:
    (I found this on a diffrent site)

    <?php
    $file = 'Contest Entery.wmv';

    if (file_exists($file)) {
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    ob_clean();
    flush();
    readfile($file);
    exit;
    }
    ?>

    Edit: Awww it didnt work..... =(

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    It would not be possible with html alone. HTML is a very simple language and cannot be used for anything over graphics. In other words - it simply is just a language to create visual elements on the page and nothing else. You would need a server-side language such as PHP to accomplish this. A server-side language is in my mind "a language that works behind the seens." For some tutorials about PHP try the following.
    http://www.tizag.com/phpT/
    http://www.quackit.com/php/
    http://www.w3schools.com/php/default.asp
    Jeremy | jfein.net

Bookmarks

Posting Permissions

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