PHP Classes

File: securemedia.php

Recommend this page to a friend!
  Classes of Florian Metzger   Secure Media   securemedia.php   Download  
File: securemedia.php
Role: Example script
Content type: text/plain
Description: sample script
Class: Secure Media
Protect Flash files from hotlinking by other sites
Author: By
Last change:
Date: 18 years ago
Size: 382 bytes


Class file image Download

require_once( 'CSecureMedia.php' );

// the directory of your secured files
$options[ 'secure_dir' ] = '/var/www/securemedia/';

// the password for your protection setup
$options[ 'password' ] = 'yourpassword';

// how many days old may a key be ?
$options[ 'max_age' ] = 1;

$sm = new SecureMedia( $options );

$sm->get( $_GET[ 'key' ], $_GET[ 'file' ] );