PHP code example of mohammadv184 / arvancloud

1. Go to this page and download the library: Download mohammadv184/arvancloud library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mohammadv184 / arvancloud example snippets


    'auth'=> [
        'default'  => 'ApiKey', //Set default Auth Type
        'UserToken'=> '',
        'ApiKey'   => '',//User API Key available in arvancloud panel
    ],
    ...

'services' => [
    'cdn' => [
        'baseUrl'  => 'https://napi.arvancloud.com/cdn/4.0/',
        'domain'   => 'your_domain.com',// Fill in the credentials here.
        'endpoints'=> [...],
    ],
    ...
]
    ...   

    use Mohammadv184\ArvanCloud\ArvanCloud;

    // load the config file from your project
    $config = 

// At the top of the file.
use Mohammadv184\ArvanCloud\ArvanCloud;
...

// Create new ArvanCloud.
$arvanCloud = new ArvanCloud($config);

// Using Cdn Service
$arvanCloud->cdn()->domain('your_domain.com')->get();

// more Example
// 1
$arvanCloud->cdn()->domain()->get('your_domain.com');
// 2 
$arvanCloud->cdn()->domain()->all();
// 3
$arvanCloud->cdn()->cache('your_domain.com')->purge();
// 4
$arvanCloud->cdn()->dns()->delete('Dns_id','your_domain.com')
                    ->getMessage();