mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
arcdns: final fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
72ba6441b7
commit
c5e9768f05
@ -12,24 +12,12 @@ $hostname = (string)$argv[3];
|
||||
$ip = (string)$argv[4];
|
||||
|
||||
// check the hostname contains '.'
|
||||
if (strpos($hostname, '.') === false) {
|
||||
if (strpos($hostname, '.') === true) {
|
||||
echo 'badparam';
|
||||
exit();
|
||||
}
|
||||
|
||||
// check the hostname contains '.'
|
||||
if (strpos($pwd, '.') === false) {
|
||||
echo 'badparam';
|
||||
exit();
|
||||
}
|
||||
|
||||
// only for IPv4 format
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
|
||||
echo "badparam";
|
||||
exit();
|
||||
}
|
||||
|
||||
$url = 'https://arcdns.tech/update/'.$hostname.'/'.$pwd.;
|
||||
$url = 'https://arcdns.tech/update/' . $hostname . '/' . $pwd;
|
||||
|
||||
$req = curl_init();
|
||||
curl_setopt($req, CURLOPT_URL, $url);
|
||||
@ -46,3 +34,5 @@ if ($json['status'] !== 'Successfuly updated') {
|
||||
curl_close($req);
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user