百度智能云

All Product Document

          CDN

          Advanced Setting

          Set HttpHeader

          $httpHeader = array( 
              'httpHeader' => array( 
                  array( 
                      "type" => "origin", 
                      "header" => "x-auth-cn", 
                      "value" => "xxxxxxxxx", 
                      "action" => "add" 
                  ) 
              ) 
          ); 
          
          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->setDomainHttpHeader($domain, $httpHeader); 
          print_r($resp); 

          Query HttpHeader

          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->getDomainHttpHeader($domain); 
          print_r($resp); 

          Setting of SEO Switch Properties

          $seoSwitch = array( 
              'seoSwitch' => array( 
                  "diretlyOrigin" => "ON", 
                  "pushRecord" => "OFF" 
              ) 
          ); 
          
          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->setDomainSeoSwitch($domain, $seoSwitch); 
          print_r($resp); 

          Query SEO Switch Property

          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->getDomainSeoSwitch($domain); 
          print_r($resp); 

          Set Page Optimization

          $fileTrim = array( 
              'fileTrim' => true 
          ); 
          
          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->setDomainFileTrim($domain, $fileTrim); 
          print_r($resp); 

          Query Page Optimization

          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->getDomainFileTrim($domain); 
          print_r($resp); 

          Set Video Dragging

          $mediaDrag = array( 
              'mediaDragConf' => array( 
                  'mp4' => array( 
                      'fileSuffix' => array('mp4'), 
                      'startArgName' => 'startIndex', 
                      'dragMode' => 'second', 
                      'endArgName' => 'end' 
                  ) 
              ) 
          ); 
          
          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->setDomainMediaDrag($domain, $mediaDrag); 
          print_r($resp); 

          Query Video Drag

          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->getDomainMediaDrag($domain); 
          print_r($resp); 

          Page Compression Setting

          $compress = array( 
              'compress' => array( 
                  "allow" => true, 
                  "type" => "br" 
              ) 
          ); 
          
          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->setDomainCompress($domain, $compress); 
          print_r($resp); 

          Query Page Compressions

          $client = new CdnClient($g_CDN_TEST_CONFIG); 
          $domain = "test-sdk.sys-qa.com"; 
          $resp = $client->getDomainCompress($domain); 
          print_r($resp); 
          Previous
          https Setting
          Next
          Access Control