#!/usr/bin/php The Gallery is going to be the directory underneath that. Generally this will be . If there is no directory in that sub-dir, then all the files in the 2nd level directory are going to get named into a gallery general. The heirarchy will be: -> -> Section or... Another approach is to have all the Categories based on year 2007 -> March -> Hiking in the Gorge -> Camping -> Willa This is how MOST of my photos will proceed. The unfortunate thing is that you miss out on multi-event trips. You can't have a "cool waterfall" heading for "hiking in the Gorge", whereas you could do that with the previous method. Hmm.... I'll have to think this one over. Next Steps: 1. Matching a comments field in a MySQL directory and attaching those comments to the SmugMug description field while uploading that photo. */ include('dirclass.inc'); include('phanlogin.inc'); include('phanapi.inc'); $fp = fopen("php://stdin","r"); $phanfare_account = "PHANFAREACCOUNT"; $phanfare_password = "PHANFAREPASSWORD"; $local_dir = "/LOCAL/DIRECTORY"; $website = "YOUR MAIN HEADING HERE"; if ($phanfare_account == "PHANFAREACCOUNT") { echo "Please edit the phan.php file to add your Phanfare login information before continuing\n"; die; } /* Log into Phanfare with the sideload API Key */ $SessionId = PhanfareLogin($phanfare_account,$phanfare_password); $topdir = new PhanObj(); $topdir->Load($SessionId, $local_dir, $website, 0); ?>