以上图填写$token 后=网址后面打开这2个网址会得到以下数据
http://adm.fxtcvip.com/user_get_user_info?token=$token
http://adm.fxtcvip.com/get_srv_list?token=$token
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
打开后返回的数据
{"code":0,"data":{"create_time":"2020-11-16 05:52:37","id":2566,"ip_time":600,"longtime_ip_amount":0,"mobile_cost":0,"mobile_price":2500,"month_amount":8163,"month_cost_amount":14,"month_init_amount":0,"password":"zdqzdq123","price":1000,"res_static_api_cost":60,"res_static_cost":31,"res_static_price":2000,"status":1,"total_amount":9340,"update_time":"2021-03-18 05:45:28","user_name":"zdqzdqzdq","white_list_status":1},"msg":"\u6210\u529f"}
{"s5": "gate5.rola-ip.co:2167", "http": "gate5.rola-ip.co:1167"}
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
user_name: 提取到的=账户后 $user_name_static_1 包括图所有的yonghuming 链接,说明中,链接中,替换成返回数据的用户名
password:提取的=密码后
s5: 转成ip:2167
http:转成ip:1167
包括选择的国家:例如美国简写us 一并生成到以上图 链接中country=us
整个代码该怎么实现啊,帮帮忙!!!!!!!!!
getproxy.php
<?php
$token=$_GET["token"];
$user_get_user_info=file_get_contents("http://adm.fxtcvip.com/user_get_user_info?token=$token");
$get_srv_list=file_get_contents("http://adm.fxtcvip.com/get_srv_list?token=$token");
//没有token值,为了测试直接用发的数据了,实际用上面的代码获取
//$user_get_user_info='{"code":0,"data":{"create_time":"2020-11-16 05:52:37","id":2566,"ip_time":600,"longtime_ip_amount":0,"mobile_cost":0,"mobile_price":2500,"month_amount":8163,"month_cost_amount":14,"month_init_amount":0,"password":"zdqzdq123","price":1000,"res_static_api_cost":60,"res_static_cost":31,"res_static_price":2000,"status":1,"total_amount":9340,"update_time":"2021-03-18 05:45:28","user_name":"zdqzdqzdq","white_list_status":1},"msg":"\u6210\u529f"}';
//$get_srv_list='{"s5": "gate5.rola-ip.co:2167", "http": "gate5.rola-ip.co:1167"}';
$o=json_decode($get_srv_list);
$arr=explode(":",$o->s5);
$ip=gethostbyname($arr[0]);
echo json_encode(array('user_get_user_info'=>$user_get_user_info,'get_srv_list'=>$get_srv_list,'ip'=>$ip));
?>
proxy.html
<meta charset="utf-8" />
<table border="1">
<tr><td>国家:</td><td><select id="country"><option value="us">美国</option></select></td></tr>
<tr><td>填写您的Token:</td><td><input type="text" id="token" /></td></tr>
<tr><td colspan="2"><input type="button" value="生成代理信息" id="create" /></td></tr>
</table><br /><br />
<strong>连接代理服务器:</strong>
<br /><br />
<table border="1">
<tr><td>服务器:</td><td id="ip" colspan="3"></td><td>Socks5端口:</td><td id="socks5port"></td></tr>
<tr><td>账号:</td><td id="account"></td><td>密码:</td><td id="pwd"></td><td>http端口:</td><td id="httpport"></td></tr>
</table><br /><br />
<strong>切换IP链接:</strong><br />
<div id="dvUrl"></div>
<br />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
var country = $('#country'), token = $('#token');
$('#create').click(function () {
if (token.val() == '') { alert('请填写您的Token!'); token.focus(); return false; }
var el = this;
el.disabled = true;
$.ajax({
url: 'getproxy.php',//注意改获取代理信息的页面名称或者路径如果名称不是getproxy.php并且和当前页面不在同一个目录下
type: 'get',cache:false,
data: { token: token.val() },
complete: function (xhr) {
el.disabled = false;
try {
var o = JSON.parse(xhr.responseText);
var user_get_user_info = JSON.parse(o.user_get_user_info);
if (user_get_user_info.code != 0) { alert('获取用户信息出错\n' + user_get_user_info.code + '-' + user_get_user_info.msg) }
else {
$('#ip').html(o.ip);
$('#dvUrl').html('http://root.fxtcvip.com/huan.php?user=' + user_get_user_info.data.user_name + ' _static_1 ' + '&country=' + country.val());
$('#account').html(user_get_user_info.data.user_name +' _static_1 ');
$('#pwd').html(user_get_user_info.data.password);
var get_srv_list = JSON.parse(o.get_srv_list);
$('#httpport').html(get_srv_list.http.split(':').pop())
$('#socks5port').html(get_srv_list.s5.split(':').pop())
}
}
catch (e) { alert(e + "\n动态页返回信息错误\n" + xhr.responseText) }
}
})
});
</script>
http://root.fxtcvip.com/getproxy.php?token=3ePdlaQDXxyNnCmA1613651742395