A newer cleaner way - extend CFImageGet.php

The second way is to create small php files that contain the settings and a call to the object instead cfimageget.php. This way you only allow for the methods you specify inside that file. The cfig_random.php file is included as an example of this method. Here is the basic contents of that file with many comments and instructions removed (see the actual file for more options and a better description. This one only allows a random image from category 7. $urltocpm = "/photos/"; $cpmfetch = new cfimageget($urltocpm); $cpmfetch->setSourceString("cat=7"); $cpmfetch->getRandom(); Normally this is very easy. At the top of the cfimageget.php file there is a section you need to modify to your installation. In most cases, you will only need to modify: include "coppermine_dao.php"; include "../photos/include/config.inc.php"; // This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory $pathtocpm = "../photos"; // This is the partial url (part AFTER your domain name, to get to the coppermine directory $urltocpm = "/photos";