add aipdw
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
1
.idea/.name
Normal file
@ -0,0 +1 @@
|
||||
aipdw
|
||||
8
.idea/aipdw.iml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/../aipdw" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/../aipdw/.idea/aipdw.iml" filepath="$PROJECT_DIR$/../aipdw/.idea/aipdw.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
65
ajax.js
Normal file
@ -0,0 +1,65 @@
|
||||
layui.use(['form'], function () {
|
||||
var form = layui.form;
|
||||
|
||||
form.on('submit(submit)', function (data) {
|
||||
var index = layer.load(2, {tiem: 999999});
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/api/",
|
||||
data: data.field,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
console.log(data)
|
||||
if (data.status == 1) {
|
||||
let ipInfo = "";
|
||||
ipInfo += " <tr>\n" +
|
||||
" <td>IP:<span style='margin-left: 3px'> " + data.ip + "</span></td>\n" +
|
||||
" </tr>\n";
|
||||
|
||||
ipInfo += " <tr>\n" +
|
||||
" <td>国:<span style='margin-left: 3px'> " + data.country + "</span></td>\n" +
|
||||
" </tr>\n";
|
||||
|
||||
ipInfo += " <tr>\n" +
|
||||
" <td>省:<span style='margin-left: 3px'> " + data.province + "</span></td>\n" +
|
||||
" </tr>\n";
|
||||
|
||||
ipInfo += " <tr>\n" +
|
||||
" <td>市:<span style='margin-left: 3px'> " + data.city + "</span></td>\n" +
|
||||
" </tr>\n";
|
||||
|
||||
ipInfo += " <tr>\n" +
|
||||
" <td>区:<span style='margin-left: 3px'> " + data.district + "</span></td>\n" +
|
||||
" </tr>\n";
|
||||
|
||||
ipInfo += " <tr>\n" +
|
||||
" <td>经纬度:<span style='margin-left: 3px'> " + data.location + "</span></td>\n" +
|
||||
" </tr>\n";
|
||||
|
||||
let head = "";
|
||||
let html = "<table class=\"layui-table\">\n" +
|
||||
" <thead>\n" +
|
||||
" </thead>\n" +
|
||||
" <tbody>\n" + ipInfo +
|
||||
" </tbody>\n" +
|
||||
"</table>";
|
||||
console.log(html);
|
||||
layer.open({
|
||||
title: 'IP地址查询',
|
||||
content: head + html,
|
||||
btn: '确定',
|
||||
btnAlign: 'c'
|
||||
});
|
||||
layer.close(index);
|
||||
} else {
|
||||
layer.msg(data.info, {icon: 2});
|
||||
layer.close(index);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.close(index);
|
||||
layer.alert('查询失败!');
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
65
api/index.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
date_default_timezone_set('PRC');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Content-type: application/json');
|
||||
// 应用API KEY
|
||||
const API_KEY = "";
|
||||
function curl_get($url){
|
||||
$header = array(
|
||||
'Accept: application/json',
|
||||
);
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, 0);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT_MS, 500);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
$data = curl_exec($curl);
|
||||
|
||||
// 显示错误信息
|
||||
if (curl_error($curl)) {
|
||||
return "Error: " . curl_error($curl);
|
||||
} else {
|
||||
// 打印返回的内容
|
||||
return ($data);
|
||||
}
|
||||
curl_close($curl);
|
||||
}
|
||||
|
||||
function is_domain($domain){
|
||||
$pat = "/^(\w+:\/\/)?([^\/]+)/i";
|
||||
if(preg_match($pat, $domain, $matches)){
|
||||
if($matches[2]){
|
||||
return 1;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
$ip = isset($_GET["ip"])?$_GET["ip"]:'';
|
||||
$type = 4;
|
||||
if(!filter_var($ip, FILTER_VALIDATE_IP)){
|
||||
//非合法IP则判断是否是域名
|
||||
if(is_domain($ip)){
|
||||
$ip = gethostbyname($ip); //是域名则获取该域名的IP
|
||||
}else{
|
||||
//既非IP也非域名,此处做错误任务处理
|
||||
}
|
||||
}
|
||||
if(filter_var($ip,FILTER_VALIDATE_IP,FILTER_FLAG_IPV4)){
|
||||
// ip4
|
||||
$type = 4;
|
||||
} else if(filter_var($ip,FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)){
|
||||
//ip6
|
||||
$type = 6;
|
||||
}
|
||||
|
||||
$url = sprintf("https://restapi.amap.com/v5/ip?key=%s&type=%s&ip=%s",API_KEY,$type, urlencode($ip));
|
||||
echo curl_get($url);
|
||||
15
docker-compose.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
services:
|
||||
phpweb:
|
||||
container_name: php73-aipdw
|
||||
image: phpstorm/php-73-apache-xdebug-27
|
||||
ports:
|
||||
- 8081:80
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
environment:
|
||||
XDEBUG_CONFIG: remote_host=host.docker.internal
|
||||
networks:
|
||||
- php73-aipdw
|
||||
networks:
|
||||
php73-aipdw:
|
||||
68
index.php
Normal file
@ -0,0 +1,68 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="layui/css/layui.css" media="all">
|
||||
<title>IP地址查询</title>
|
||||
</head>
|
||||
<style>
|
||||
.images {
|
||||
width: 110%;
|
||||
height: 110%;
|
||||
background-size: 100% 100%;
|
||||
z-index: -100;
|
||||
position: fixed;
|
||||
left: -5%;
|
||||
top: -5%;
|
||||
background-color: #8a2bff;
|
||||
}
|
||||
.icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<br>
|
||||
<div class="images"
|
||||
style="background-image: url(http://s.cn.bing.net/th?id=OHR.BluebellWood_ZH-CN8128422960_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp);"></div>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space8">
|
||||
<div class="layui-col-xs12 layui-col-sm6 layui-col-sm-offset3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="font-size:1.2em">
|
||||
QQ服务开通查询
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<blockquote class="layui-elem-quote" style="margin: 1em 0 ;">QQ服务开通查询,可查询已经开通的服务!<br>查询数据缓存24小时左右<br>如遇查询失败请重新查询<br>一直失败请联系网站管理员,谢谢!
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger" style="float: right"
|
||||
target="_blank">注意</a></blockquote>
|
||||
<div class="layui-form layui-form-pane">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">IP/域名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ip" placeholder="请输入你的ip或域名(不要带http://)" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid"
|
||||
style="background-color: white;color: #745dff;border: solid 1px #745dff;border-radius:10em"
|
||||
lay-submit lay-filter="submit">获取查询结果
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<HR>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="layui/layui.all.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
|
||||
<script src="ajax.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
2
layui/css/layui.css
Normal file
2
layui/css/layui.mobile.css
Normal file
2
layui/css/modules/code.css
Normal file
@ -0,0 +1,2 @@
|
||||
/** layui-v2.5.6 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
||||
2
layui/css/modules/laydate/default/laydate.css
Normal file
BIN
layui/css/modules/layer/default/icon-ext.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
layui/css/modules/layer/default/icon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
2
layui/css/modules/layer/default/layer.css
Normal file
BIN
layui/css/modules/layer/default/loading-0.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
layui/css/modules/layer/default/loading-1.gif
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
layui/css/modules/layer/default/loading-2.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
layui/font/iconfont.eot
Normal file
BIN
layui/font/iconfont.eot_v=256
Normal file
554
layui/font/iconfont.svg
Normal file
|
After Width: | Height: | Size: 299 KiB |
554
layui/font/iconfont.svg_v=256
Normal file
|
After Width: | Height: | Size: 299 KiB |
BIN
layui/font/iconfont.ttf
Normal file
BIN
layui/font/iconfont.ttf_v=256
Normal file
BIN
layui/font/iconfont.woff
Normal file
BIN
layui/font/iconfont.woff2
Normal file
BIN
layui/font/iconfont.woff2_v=256
Normal file
BIN
layui/font/iconfont.woff_v=256
Normal file
BIN
layui/images/face/0.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
layui/images/face/1.gif
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
layui/images/face/10.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
layui/images/face/11.gif
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
layui/images/face/12.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
layui/images/face/13.gif
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
layui/images/face/14.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
layui/images/face/15.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
layui/images/face/16.gif
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
layui/images/face/17.gif
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
layui/images/face/18.gif
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
layui/images/face/19.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
layui/images/face/2.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
layui/images/face/20.gif
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
layui/images/face/21.gif
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
layui/images/face/22.gif
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
layui/images/face/23.gif
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
layui/images/face/24.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
layui/images/face/25.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
layui/images/face/26.gif
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
layui/images/face/27.gif
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
layui/images/face/28.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
layui/images/face/29.gif
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
layui/images/face/3.gif
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
layui/images/face/30.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
layui/images/face/31.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
layui/images/face/32.gif
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
layui/images/face/33.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
layui/images/face/34.gif
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
layui/images/face/35.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
layui/images/face/36.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
layui/images/face/37.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
layui/images/face/38.gif
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
layui/images/face/39.gif
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
layui/images/face/4.gif
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
layui/images/face/40.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
layui/images/face/41.gif
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
layui/images/face/42.gif
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
layui/images/face/43.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
layui/images/face/44.gif
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
layui/images/face/45.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
layui/images/face/46.gif
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
layui/images/face/47.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
layui/images/face/48.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
layui/images/face/49.gif
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
layui/images/face/5.gif
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
layui/images/face/50.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
layui/images/face/51.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
layui/images/face/52.gif
Normal file
|
After Width: | Height: | Size: 777 B |
BIN
layui/images/face/53.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
layui/images/face/54.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
layui/images/face/55.gif
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
layui/images/face/56.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
layui/images/face/57.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
layui/images/face/58.gif
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
layui/images/face/59.gif
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
layui/images/face/6.gif
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
layui/images/face/60.gif
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
layui/images/face/61.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
layui/images/face/62.gif
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
layui/images/face/63.gif
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
layui/images/face/64.gif
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
layui/images/face/65.gif
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
layui/images/face/66.gif
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
layui/images/face/67.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
layui/images/face/68.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
layui/images/face/69.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
layui/images/face/7.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
layui/images/face/70.gif
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
layui/images/face/71.gif
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
layui/images/face/8.gif
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
layui/images/face/9.gif
Normal file
|
After Width: | Height: | Size: 4.1 KiB |