PHP code example of thinkingcircles / flaredns-client

1. Go to this page and download the library: Download thinkingcircles/flaredns-client 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/ */

    

thinkingcircles / flaredns-client example snippets


// config/app.php

'providers' => [
    // Other service providers...    
    ThinkingCircles\FlareDNSClient\FlareDNSClientServiceProvider::class,
]


// .env

cloudflare_zone_id=
cloudflare_global_api_key=
cloudflare_api_email=


// config/flaredns-client.php

 return [
    
    'cloudflare_api_account' => [
        'cloudflare_zone_id' => 'ZONE-ID',
        'cloudflare_global_api_key' => 'API-KEY',
        'cloudflare_api_email' => 'API-EMAIL',
        'dns_records' => [
        	//will match id or name
            ['id'=>null, 'name'=>'domain.net'],
            ['id'=>'CloudFlare-API-Record-ID', 'name'=>null]
        ]
    ]

];


// App/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
    $schedule->command('flarednsclient:ipsync')->everyFiveMinutes();
}

php artisan vendor:publish --provider="ThinkingCircles\FlareDNSClient\FlareDNSClientServiceProvider"