Location: PHPKode > scripts > phpFlickrSynch > phpflickrsynch/phpFlickrSynch.php
<?php
/* phpFlickrSynch 1.0
 * Written by Nicolas Leroy (hide@address.com)
 * Project Home Page: http://www.nicolasleroy.fr/scripts-and-coding/phpflickrsynch/
 */
	define('PHPFLICKRSYNCH_VERSION', '1.0');

	// Class loader
	if (!class_exists('Services_JSON')) { require_once '_classes/JSON.php';}
	if (!class_exists('phpFlickr')) { require_once 'phpFlickr-2.3.1/phpFlickr.php';}

	$_flickr_classes_list = array('helpers', 'TableFlickrPhoto', 'TableFlickrPortfolio', 'TableFlickrTag', 'TableFlickrGroup', 'GeoUtils', 'FlickrUtils', 'TableFlickrTag');
	foreach ($_flickr_classes_list as $key => $classname) {
		if (!class_exists($classname)) {
			require_once '_classes/class_' . $classname . '.php';
		}
	}	

	$_flickr_classes_list = array('Photo', 'PhotoAlbum', 'Tag', 'PhotoCollection', 'PhotoSearch', 'Group', 'Location');
	foreach ($_flickr_classes_list as $key => $classname) {
		if (!class_exists($classname)) {
			require_once '_publicApi/class_' . $classname . '.php';
		}
	}	

	require_once 'phpFlickrSynch_config.php';
	
	// TODO: need better handling of MySQL port (default 3306 works well) + Exception
	$FLDB = new PDO('mysql:host=' . PHPFLICKRSYNCH_MYSQL_HOST . ';dbname=' . PHPFLICKRSYNCH_MYSQL_DATABASE, PHPFLICKRSYNCH_MYSQL_USER, PHPFLICKRSYNCH_MYSQL_PASSWORD);
?>
Return current item: phpFlickrSynch