百度智能云

All Product Document

          CDN

          Getting Started

          1. Initialize a CdnClient

            CdnClient is a client that interacts with the CDN service. The CDN operations of the PHP SDK are all done through CdnClient. The user can refer to Create CdnClient to complete client initialization.

          2. View the list of accelerated domain name

            You can get the list of accelerated domain names successfully created through listDomains().

          3. Create/delete accelerated domain name

            The createDomain() method is used to create accelerated domain names. After it is created successfully, the CDN platform returns the newly generated CNAME record. After an accelerated domain name is created, you can query and modify it in subsequent operations. The deleteDomain() method is used to delete the accelerated domain names created.

          4. Start/stop the accelerated domain name

            The enableDomain() method is used to enable the accelerated domain name. The disableDomain() method is used to disable the accelerated domain name.

          5. Query and modify the configuration of the accelerated domain name

            5.1After creating accelerated domain names, you can get the detailed configuration information of the specified accelerated domain name through the getDomainConfig() method;

            5.2Query the cache expiration policy of the domain name through getDomainCacheTTL();

            5.3You can modify the detailed configuration of the accelerated domain name through setDomainOrigin(), configure a flexible cache expiration policy through setDomainCacheTTL() (for policy description, see Cache Configuration and restrict access to specific clients through setDomainRefererAcl() and setDomainIpAcl().

          6. Query domain name traffic

            You can query detailed access statistics through the getDomainXXXStat() interface, such as getDomainPvStat() to query pv, getDomainFlowStat() to query traffic and bandwidth, getDomainSrcFlowStat() to query origin traffic, getDomainHitRateStat() to query hit rate, and getDomainHttpCodeStat() to query status code statistics.

          7. Submit cache purging task

            To get one or more Objects, you can see Purge Cache.

          8. Submit cache preloading tasks

            To get one or more Objects, you can see Cache Preloading.

          9. Get the domain name access logs

            CDN provides users with complete log management and download features. You can get the log data of a specified domain name in a specified time period through API. Please see [Get Access Logs](CDN/SDK Reference/PHP-SDK/Log Interface.md#Get Access Logs).

          Previous
          SDK Installation Toolkit
          Next
          CdnClient