Cdn的proxy里api key用法案例

来自cdnbest帮助文档
跳转至: 导航搜索

用户的proxy帐号里api key要设置好,那个key设置后是不显示的,但会显示已设置
key是自已随便生成的

$uid = 22222;
               $skey = 'langansafe&*#';
               $time = time();
               $vhost = 'liuwei';
               $data = array(
                               'uid'=>$uid,
                               't'=>$time,
                               'skey'=>$skey,
                               'vhost'=>$vhost,
                               'sign'=>md5(md5($uid.$skey).$time),
               );
               $url = "https://www.test.com/api2/site/index.php/token";
               $str = $this->curl($url,$data);
               $re = json_decode($str,true);
               return $re;