PranasLu's Blog

2010-02-22

Smart File download script

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

Ieskodamas PHP download scripto aptikau: http://www.zubrag.com/scripts/download.php

Nemokamas scriptas ir bent jau kaip pavyzdi tikrai galima pasiziuret.

Features:

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

Usage:

  • 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?f=phptutorial.zip”>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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: