<?php header("Content-type:text/html; charset=utf8"); include '../lib/getRecordID.php'; include '../lib/getDomainID.php'; echo getRecordID(getDomainID("barretlee.com"), 'test');
<?php header("Content-type:text/html; charset=utf8"); include '../lib/getRecordID.php'; include '../lib/getDomainID.php'; echo getRecordID(getDomainID("simread.com"), 'test');
require_once dirname(__FILE__) . '/lib/getPublicIP.php'; require_once dirname(__FILE__) . '/lib/getRecordIP.php'; //验证用户名、密码 if (!verify()) { echo '登录失败。' . PHP_EOL; echo ' 可能原因: 用户名、密码错误,登录失败次数太多,API接口调用次数超出限制等' . PHP_EOL; exit; } //获取域名ID $domain_id = getDomainID(DOMAIN); if (!$domain_id) { echo '域名未在DNSPOD添加,请在DNSPOD添加域名。' . PHP_EOL; exit; } //获取RECORD ID $record_id = getRecordID($domain_id, RECORD); if (!$record_id) { echo '您当前还未在DNSPOD建立此record记录,请先前往DNSPOD添加记录。' . PHP_EOL; exit; } $record_ip = getRecordIP($domain_id, RECORD); //echo '当前record ID 为'.$record_id.PHP_EOL"; echo '当前record IP 为' . $record_ip . PHP_EOL; //获取当前的广域网IP地址 $ip = getPublicIP(); //判断获取的公网IP地址是否合法 if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { echo '获取的IP地址不是合法的公网IP,获取的IP地址为:' . $ip . PHP_EOL; exit; } echo '当前广域网IP为:' . $ip . PHP_EOL;