require( dirname(__FILE__) . '/../../../wp-config.php' ); if (!(is_user_logged_in() && current_user_can('edit_posts'))) die("Athentication failed!"); //print_r("Req\n"); //print_r($_REQUEST); //print_r("Files\n"); //print_r($_FILES); //print_r("Get\n"); //print_r($_GET); //print_r("Post\n"); //print_r($_POST); //$filepath = dirname(__FILE__) . '/files/log.txt'; //file_put_contents($filepath, , FILE_APPEND); // //Snipshot callback test // //Install this script on your server to test and debug callbacks from //www.snipshot.com. Note: this script will need read and write access //to your image directory. //CHANGE THIS TO THE DIRECTORY WHERE YOUR IMAGES WILL BE SAVED $IMG_DIR = './files'; chdir($IMG_DIR); //CHANGE THIS TO THE NAME OF THE FIELD THAT CARRIES THE IMAGE DATA OR URL $OUTPUT = 'file'; function print_pre($r, $desc=''){ echo '
' . $desc . ' ' . print_r($r) . ''; } function glob_rsort_modtime( $patt ) { if ( ( $files = @glob($patt, GLOB_BRACE) ) === false ) return array(false, 'Glob error.'); if ( !count($files) ) return array(false, 'No files found.'); $rtn = array(); foreach ( $files as $filename ) $rtn[$filename] = filemtime($filename); arsort($rtn); reset($rtn); foreach ( $rtn as $filename => $t ) $rtn[$filename] = date('r', $t); return $rtn; } ?>
';
//}
?>
Please save the page in order to see the changes. Close this window