开发者

How to change TTL of a file on a cloud through PHP

I am trying to simply change the TTL value of a container that is already created on my rackspace cloud. I created this php script but am still new to php and this project is a little over my head. I know it is possible but could use some guidance on how to get this to work.

Here is my code:

<?php
require('cloudfiles.php');
$username = "USERNAME";
$key = "API_KEY";
$containname = "CONTAINERNAME";

$auth = new CF_Authentication($username, $key);
$auth->authenticate();
$conn = new CF_Co开发者_高级运维nnection($auth);

$container = $conn->get_container($containname);

$container->make_public(1); 
?>


In the docs for the make_public() method it says:

Either enable this Container's content to be served via CDN or adjust its CDN attributes.

So I guess you can just call it again with the new TTL value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜