PranasLu's Blog


Smart File download script

Filed under: Programming — Tags: , , — pranaslu @ 09:31

Ieskodamas PHP download scripto aptikau:

Nemokamas scriptas ir bent jau kaip pavyzdi tikrai galima pasiziuret.


  • customizable allowed file types for download
  • predefined mime type settings for following extensions: zip, pdf, doc, xls, ppt, exe, gif, png, jpg, mp3, wav, mpeg, mpg, mpe, mov, avi
  • Hotlinking protection
  • Script can log downloads in plain text file. Log file includes: IP, date/time, filename. Can turn this feature on/off.
  • automatic mime type detection (if Mimetype or Fileinfo extension installed on the server)


  • Unzip script to some folder
  • Update download.php with your desired settings for base downloads folder, downloads log file name, allowed file types
  • Use following syntax for downloads: download.php?f=FileName

Sample download link:
<a href=”http://path/to/script/download.php?”>Cool PHP Tutorial</a>


Download file


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: