嗨,我正在尝试制作一个将 SRV 记录添加到 cloudflare 的脚本,但无法使其正常工作:(
<?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("my@email.dk", "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