diff --git a/akamai/ccu_v3.php b/akamai/ccu_v3.php
index 060ee694..59851763 100644
--- a/akamai/ccu_v3.php
+++ b/akamai/ccu_v3.php
@@ -18,7 +18,7 @@
* Note that in order for this to work you need to provision credentials
* specifically for CCU - you cannot extend existing credentials to add
* CCU as it's managed under "CCU" in the API credential system.
- *
+ *
* Configure->Organization->Manage APIs
* Select "CCU APIs"
* Create client collections/clients
@@ -26,53 +26,54 @@
*
* Put the credentials in ~/.edgerc as demonstrated by api-kickstart/sample_edgerc
*/
+
namespace Akamai\Open\Example;
require_once __DIR__ . '/cli/init.php';
class CcuClient
{
- /**
- * @var \Akamai\Open\EdgeGrid\Client
- */
- protected $client;
+ /**
+ * @var \Akamai\Open\EdgeGrid\Client
+ */
+ protected $client;
+
+ public function __construct()
+ {
+ $this->client = \Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile('ccu');
- public function __construct()
- {
- $this->client = \Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile('ccu');
-
- }
+ }
- public function postPurgeRequest($hostname, $objects)
- {
- $purge_body = [
- 'objects' => $objects
- ];
-
- $response = $this->client->post('/ccu/v3/invalidate/url', [
- 'body' => json_encode($purge_body),
- 'headers' => ['Content-Type' => 'application/json']
- ]);
- return $response;
- }
+ public function postPurgeRequest($hostname, $objects)
+ {
+ $purge_body = [
+ 'objects' => $objects
+ ];
+
+ $response = $this->client->post('/ccu/v3/invalidate/url', [
+ 'body' => json_encode($purge_body),
+ 'headers' => ['Content-Type' => 'application/json']
+ ]);
+ return $response;
+ }
}
$ccu = new CcuClient();
$url = $_POST['url'];
-
+echo $url;die();
try {
- $objects = [
- $url
- ];
+ $objects = [
+ $url
+ ];
- $purge = $ccu->postPurgeRequest('data.chinarundreisen.com', $objects);
- $response = json_decode($purge->getBody());
- if($response->httpStatus == 201){
- echo '{"msg":"success"}';
- }else{
- echo json_encode($response);
- }
+ $purge = $ccu->postPurgeRequest('data.chinahighlights.com', $objects);
+ $response = json_decode($purge->getBody());
+ if ($response->httpStatus == 201) {
+ echo '{"msg":"success"}';
+ } else {
+ echo json_encode($response);
+ }
} catch (\GuzzleHttp\Exception\ClientException $e) {
- header("status: 404 not found");
- echo "An error occurred: " .$e->getMessage(). "\n";
+ header("status: 404 not found");
+ echo "An error occurred: " . $e->getMessage() . "\n";
}
diff --git a/application/views/mobile_first/ch-pc.php b/application/views/mobile_first/ch-pc.php
index 2105c9b9..11fb182a 100644
--- a/application/views/mobile_first/ch-pc.php
+++ b/application/views/mobile_first/ch-pc.php
@@ -19,7 +19,7 @@
-
+