您好我想作一個腳本,將一個SRV記錄CloudFlare的,但不能讓它的工作:(CloudFlare的API SRV添加PHP
<?php
include_once("includes/class_cloudflare.php");
$domain = 'game-panel.dk';
$type = 'SRV';
$name = 'testing';
$content = 'myip';
$ttl = '1';
$mode = '0';
$prio = '5';
$service = '_ts3';
$srvname = 'testing';
$protocol = 'UDP';
$weight = '1';
$port = '10002';
$target = 'testing.game-panel.dk';
$cf = new cloudflare_api("[email protected]", "mycloudflareapikey");
$response = $cf->rec_new($domain, $type, $name, $content, $ttl, $mode, $prio);
print_r($response);
?>
我得到這樣的迴應:
stdClass Object ([request] => stdClass Object ([act] => rec_new) [result] => error [msg] => Invalid service value. [err_code] => service-)
我使用這個類:
https://github.com/vexxhost/CloudFlare-API/blob/master/class_cloudflare.php
我現在修復了它 – JonathanNet
請解釋您是如何修復它以造福未來用戶的。 – mjsa