net2ftp! This page shows how to integrate net2ftp in a generic PHP page. It is quite easy: 1. Define the constants NET2FTP_APPLICATION_ROOTDIR and NET2FTP_APPLICATION_ROOTDIR_URL 2. Include the file main.inc.php 3. Execute 5 net2ftp() calls to send the HTTP headers, print the Javascript code, print the HTML body, etc... 4. Check if an error occured to print out an error message. Look in /integration for more elaborate examples. Enjoy, David */ // ------------------------------------------------------------------------ // 1. Define the constants NET2FTP_APPLICATION_ROOTDIR and NET2FTP_APPLICATION_ROOTDIR_URL // ------------------------------------------------------------------------ define("NET2FTP_APPLICATION_ROOTDIR", dirname(__FILE__)); if (isset($_SERVER["SCRIPT_NAME"]) == true) { define("NET2FTP_APPLICATION_ROOTDIR_URL", dirname($_SERVER["SCRIPT_NAME"])); } elseif (isset($_SERVER["PHP_SELF"]) == true) { define("NET2FTP_APPLICATION_ROOTDIR_URL", dirname($_SERVER["PHP_SELF"])); } // ------------------------------------------------------------------------ // 2. Include the file /path/to/net2ftp/main.inc.php // ------------------------------------------------------------------------ require_once("./main.inc.php"); // ------------------------------------------------------------------------ // 3. Execute net2ftp($action). Note that net2ftp("sendHttpHeaders") MUST // be called once before the other net2ftp() calls! // ------------------------------------------------------------------------ net2ftp("sendHttpHeaders"); // ?>