PHP Classes

File: downloader.php

Recommend this page to a friend!
  Classes of Parsa Yazdani   Temporary PHP File Hosting   downloader.php   Download  
File: downloader.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Temporary PHP File Hosting
Host shared files to be downloaded for some time
Author: By
Last change:
Date: 8 months ago
Size: 295 bytes
 

Contents

Class file image Download
<?php
if(time() - file_get_contents('creation_date/' . $_GET['file'] . '.sfdb') > 10800)
    die(
'File is 3 hours old and no longer accessable');
echo
file_get_contents('uploads/' . $_GET['file'] . '.stuf');
header('Content-Disposition: attachment; filename="'. substr($_GET['file'], 21) . '"');