2022-12-18 18:14:03 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\controller;
|
|
|
|
include_once base_path().'/vendor/laysense/dns/src/resource/ipv6.php';
|
|
|
|
use dnstools\ipv6; #用于IPv6相关
|
2022-12-19 19:49:52 +08:00
|
|
|
|
2022-12-18 18:14:03 +08:00
|
|
|
|
|
|
|
class DnsController
|
|
|
|
{
|
|
|
|
public function DNS($type,$name,$rip,$id,$query)
|
|
|
|
{
|
2022-12-19 19:49:52 +08:00
|
|
|
$ipv6=new IPv6;
|
|
|
|
$ipv6->ip2bin($ip);
|
2022-12-18 18:14:03 +08:00
|
|
|
|
|
|
|
#此处无需修改
|
|
|
|
$send['id']=$id;
|
|
|
|
$send['query']=$query;
|
|
|
|
$return=json_encode($send);
|
|
|
|
return $return;
|
|
|
|
}
|
|
|
|
}
|