menu So ' Api 文章列表
dvr
小米
keyboard_arrow_down
dvr
微短信
keyboard_arrow_down
dvr
云码
keyboard_arrow_down
dvr
腾讯
keyboard_arrow_down
dvr
宝塔面板
keyboard_arrow_down
last_page
last_page
last_page
last_page

IP代理池

使用教程


请求地址 https://api.2su.cc/api/107/

返回数据 { "data": [ "34.135.34.92:8585", "223.247.46.86:8089", "34.118.97.126:8585", "34.162.14.5:8585", "49.70.89.77:8089", "185.74.6.247:8080", "50.206.25.107:80", "34.118.23.147:8585", "157.90.206.1:8080", "190.97.228.18:999" ] }

Example

调用效果 API调用示例

API调用示例






						<!DOCTYPE html>
<html>
<head>
    <title>API调用示例</title>
</head>
<body>
    <h1>API调用示例</h1>
    <form id="myForm">
        <label for="type">代理平台:</label><br>
        <select id="type" name="type">
            <option value="66ip">66ip</option>
        </select><br>
        <label for="num">数量:</label><br>
        <input type="number" id="num" name="num"><br><br>
        <input type="submit" value="提交">
    </form>

    <div id="result"></div>

    <script>
        document.getElementById("myForm").addEventListener("submit", function(event){
            event.preventDefault()

            var type = document.getElementById("type").value
            var num = document.getElementById("num").value

            var xhr = new XMLHttpRequest();
            xhr.onreadystatechange = function() {
                if (this.readyState == 4 && this.status == 200) {
                    var response = JSON.parse(this.responseText);
                    document.getElementById("result").innerHTML = "<pre>" + JSON.stringify(response, null, 2) + "</pre>";
                }
            };
            xhr.open("GET", "https://api.2su.cc/api/107/?type="+type+"&num="+num, true);
            xhr.send();
        });
    </script>
</body>
</html>

					

请求参数

提交方式:GET

参数名称类型是否必须描述
type string 代理平台:66ip
num number 数量