casbboy
1
I can’t believe this is not an answered question. But, is there a way to purge an entire folder or an entire subdomain?
Cloudflare seems stuck with the idea that I’d want to either delete a single file or everything. There is no middle road.
All feedback appreciated.
Cheers!
Ryan
Im very confused by your question. You can delete any directory or file needed. I guess we just need to know your requirements?
But you can delete a directory by using the below:
http://php.net/manual/en/function.rmdir.php
Sorry,
I mean, when working with Cloudflare API.
A PHP solution that I use:
file: index-to-delete-specific-folder.php
<?php
$delDir = isset($_GET['delDir']) ? $_GET['delDir'] : NULL;
$pWord = isset($_GET['pWord']) ? $_GET['pWord'] : NULL;
if($delDir && is_dir($delDir) && 'password-goes-here'===$pWord)
{
$retval = 'byRef'
echo 'system() ' .system('rm -rf ' . escapeshellarg($delDir), $retval);
echo '<br />';
echo '$reval : '.$retval;
echo '<br />';
}else{
echo'Could not delete directory';
}//
system
Closed
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.