HEX
Server: Apache
System: Linux SH-FR-PM-y8qo 6.6.80-paas #1 SMP PREEMPT_DYNAMIC Thu Sep 25 11:18:23 UTC 2025 x86_64
User: hosting-user (5000)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: //srv/admin/htdocs/purge.php
<?php
$debug    = false;

$cmd = isset($_GET["all"]) ? 'PURGEALL' : 'PURGE';
$hostname = isset($_GET["host"]) ? $_GET["host"] : $_SERVER["HTTP_HOST"];
$path = isset($_GET["path"]) ? $_GET["path"] : '';
$purge_url = "http://" . $hostname . "/$path";

purgeURL( $cmd, $purge_url, $debug );

function purgeURL( $cmd, $purge_url, $debug )
{
    $curlOptionList = array(
        CURLOPT_RETURNTRANSFER    => true,
        CURLOPT_CUSTOMREQUEST     => $cmd,
        CURLOPT_URL               => $purge_url,
        CURLOPT_CONNECTTIMEOUT_MS => 2000
    );

    $fd = false;
    if( $debug == true )
    {
        print "\n---- Curl debug -----\n";
        $fd = fopen("php://output", 'w+');
        $curlOptionList[CURLOPT_VERBOSE] = true;
        $curlOptionList[CURLOPT_STDERR]  = $fd;
    }

    $curlHandler = curl_init();
    curl_setopt_array( $curlHandler, $curlOptionList );
    $data = curl_exec( $curlHandler );
    curl_close( $curlHandler );
    if( $fd !== false )
    {
        fclose( $fd );
    }
    print($data);
}
?>