<?php 
/**
 * Cpmfetch :: cfig_random.php
 *
 * This is an example of extending the cfimageget.php file to provide a more
 * secure and simpler access to your images.
 *
 * Usage:  Call this file from an img tag and it will return graphic data to you, customtize
 * it below
 *
 * 
 * The presedence is album over category, so if you add in both - you get whatever album is looking for
 *
 * @author vuud
 * @package cpmfetch
 * @since 1.6.4
 */
/**
/**
* This program builds on cfimageget.php
*/
require_once "cfimageget.php";

$cpmfetch = new cfimageget();

/* Uncomment this if you want ACCESS TO  ANY PRIVATE  or non-private photos  */
//   $cpmfetch->setPrivacyFlagOn(false);

/* These can be used to limit the selection of photos 
		the following are examples.
*/
$cpmfetch->setSourceString("");                            // Category 2 only
//$cpmfetch->setSourceString("cat=7,6,8");                      // Categories 6, 7 and 8  only
//$cpmfetch->setSourceString("cat=7:album=1,2,3");    // Category 7 and albums 1, 2 and 3


/* This can be altered to change what is allowed for media types */
$cpmfetch->setAllowedTypes(array('.jpg','.gif','.png'));      //This is the default
  
/*
This section determines what kind of image will be returned
 Uncomment one of the following
*/

$cpmfetch->getRandom();
//$cpmfetch->getLastAdded();

?>
