51 lines
1.0 KiB
PHP
51 lines
1.0 KiB
PHP
<?php
|
|
# Cloudflare API Cache v4
|
|
# @cecekpawon 11/23/2015 10:05:10 AM
|
|
# thrsh.net
|
|
# docs: https://api.cloudflare.com/
|
|
# Cloudflare API Cache Wrapper
|
|
# @cecekpawon 11/23/2015 10:11:44 AM
|
|
# thrsh.net
|
|
require_once("include/cloudflare_cache.php");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$cf_cache_v1 = new cloudflare_cache(
|
|
array(
|
|
"tkn" => "b4fafa93f2bcd7ce518553d2df2793edd06e8",
|
|
"email" => "lepslair@gmail.com",
|
|
"z" => "bateworld.com"
|
|
)
|
|
);
|
|
|
|
# Update cache per-file (url)
|
|
$res = $cf_cache_v1->purge_file("https://bateworld.com/uploads_video/380000/379444/81255.mp4");
|
|
|
|
|
|
|
|
|
|
/*
|
|
$cf_cache_v4 = new cloudflare_cache(
|
|
array(
|
|
"email" => "lepslair@gmail.com",
|
|
"key" => "b4fafa93f2bcd7ce518553d2df2793edd06e8",
|
|
"domain" => "bateworld.com"
|
|
)
|
|
);
|
|
|
|
# Update cache file(s) (url)
|
|
$res = $cf_cache_v4->purge_file(
|
|
array(
|
|
"https://bateworld.com/uploads_user/8000/7653/479335_thumb.jpg",
|
|
"https://bateworld.com/uploads_user/8000/7653/479335.jpg",
|
|
|
|
)
|
|
);
|
|
*/
|
|
|
|
# Update cache all in domain
|
|
//$res = $cf_cache_v4->purge_all();
|
|
?>
|