Example #1
0
$offset = 0;
//
$ips_used = 0;
//
$i_offset = 0;
//
$end = false;
//
$ip_array = array();
$dns_zone_array = array();
$difference = 0;
if (!file_exists($seed_dump)) {
    echo "Didn't find seed_dump at {$seed_dump}\n";
} else {
    $cf = new cloudflare_api($user, $key);
    $response_object = $cf->rec_load_all($domain);
    //ALL dns entries of domain
    $response_json = json_encode($response_object);
    //make objects to JSON
    $response_array = json_decode($response_json, true);
    //make JSON to array, thanks php
    if (isset($response_array["err_code"])) {
        if ($response_array["err_code"] == "E_UNAUTH") {
            echo "Auth failed, check your email and key!";
        }
    }
    //write IPs into array
    $ip_raw = file($seed_dump);
    //read seed_dump into array
    $ip_numbers_in_file = count($ip_raw);
    while ($i2 < $ip_numbers_in_file) {