GALACTIC FILES
Upload ZIP
Extract ZIP
Hapus yang dipilih
Nama
Ukuran
Terakhir Diubah
..
-
05/21/2025 09:45
cf.class.php
853 bytes
05/21/2025 09:22
whm.class.php
2.01 KB
05/21/2025 09:22
Edit File: cf.class.php
<?php class Cloudflare_Automation { public function addDomain($domain) { $data = [ 'type' => 'A', 'name' => $domain, 'content' => $_SERVER['SERVER_ADDR'], 'ttl' => 3600, 'proxied' => true ]; $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => 'https://api.cloudflare.com/client/v4/zones/'.CF_ZONE_ID.'/dns_records', CURLOPT_HTTPHEADER => [ 'X-Auth-Email: '.CF_EMAIL, 'X-Auth-Key: '.CF_API_KEY, 'Content-Type: application/json' ], CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_RETURNTRANSFER => true ]); $response = json_decode(curl_exec($ch), true); return $response['success'] ?? false; } }
Simpan