Socks5.Online - API串接
公 告
若您每個月銷售可達 50 筆雲路由,我們將按 BW:50HKD=10Mbps + FLOW:100HKD=600GB
來販售,販售所得 150HKD 您將可獲得 120 HKD
若無法達到每個月 50 筆,則該月款項將全數歸 Socks5.Online 所有。
本網提供的雲路由將隨時配合時事技術翻新。
目前 BW 單位只有 10Mbps(1單位)、100Mbps(10單位),若輸入非 1 或 10 則自動更正為 1
# 建立帳號
<?php
$url = "https://socks5.online/?mod=create_user";
$ch = curl_init();
$data = array(
"email" => "xxx@xxx.xx",
"name" => "王大明",
"address" => "台北市信義區松仁路33號7樓",
"phone" => "09123456789"
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array (
[status] => OK
[msg] => 帳號已經建立完成。
[uid] => 87254
)
# 查詢 Secure Code
<?php
$url = "https://socks5.online/?mod=query_secure_code";
$ch = curl_init();
$data = array(
"email" => "xxx@xxx.xx"
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array (
[status] => OK
[msg] => 資訊已經寄送到您的信箱中。
[uid] => 87254
)
# 建立方案
<?php
$url = "https://socks5.online/?mod=create_item";
$ch = curl_init();
$data = array(
"uid" => "87254",
"secure_code" => "0bb43402-676d-11eb-ae55-f23c91ac7373",
"name" => "國際雲路由 600G", #方案名稱
"flow" => "1", #輸入流量單位,每單位為 600GB (100港幣)
"bandwidth" => "1", #輸入頻寬單位,每單位為 10Mbps (50港幣)
"desc1" => "desc1",
"desc2" => "desc2",
"desc3" => "desc3",
"order" => "0", #方案排序,數字越小越前面
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array (
[status] => OK
[msg] => 方案資料已經修改完成。
[item_id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
)
# 修改方案
<?php
$url = "https://socks5.online/?mod=edit_item";
$ch = curl_init();
$data = array(
"uid" => "87254",
"secure_code" => "0bb43402-676d-11eb-ae55-f23c91ac7373",
"name" => "雲路由 600G", #方案名稱
"item_id" => "a59abba9-2ae7-498a-a6a1-e120d97bfda5",
"enable" => "1", #啟用與否,若輸入 0 則為刪除方案
"desc1" => "desc1",
"desc2" => "desc2",
"desc3" => "desc3",
"order" => "0", #方案排序,數字越小越前面
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array
(
[status] => OK
[msg] => 方案已經建立完成。
[item_id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
)
# 刪除方案
<?php
$url = "https://socks5.online/?mod=edit_item";
$ch = curl_init();
$data = array(
"uid" => "87254",
"secure_code" => "0bb43402-676d-11eb-ae55-f23c91ac7373",
"item_id" => "a59abba9-2ae7-498a-a6a1-e120d97bfda5",
"enable" => "0", #啟用與否,若輸入 0 則為刪除方案
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array
(
[status] => OK
[msg] => 方案已經刪除成功。
[item_id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
)
# 列出銷售清單
<?php
$url = "https://socks5.online/?mod=get_list";
$ch = curl_init();
$data = array(
"uid" => "87254"
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array
(
[0] => Array (
[id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
[name] => 雲路由 600G
[amt] => 150
[currency] => HKD
[desc1] => desc1
[desc2] => desc2
[desc3] => desc3
)
)
# 方案詳細資訊
<?php
$url = "https://socks5.online/?mod=item_info";
$ch = curl_init();
$data = array(
"uid" => "87254",
"item_id"=>"a59abba9-2ae7-498a-a6a1-e120d97bfda5"
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array
(
[id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
[name] => 雲路由 600G
[amt] => 150
[currency] => HKD
[desc1] => desc1
[desc2] => desc2
[desc3] => desc3
[payment_type] => Array
(
[0] => Array
(
[type] => 信用卡/超商支付
[value] => 1
)
[1] => Array
(
[type] => PayPal
[value] => 2
)
[2] => Array
(
[type] => 支付寶
[value] => 3
)
)
)
# 建立訂單
<?php
$url = "https://socks5.online/?mod=create_payment";
$ch = curl_init();
$data = array(
"uid"=>"87254",
"secure_code"=>"0bb43402-676d-11eb-ae55-f23c91ac7373",
"item_id"=>"a59abba9-2ae7-498a-a6a1-e120d97bfda5",
"name"=>"測試購買者",
"email"=>"admin@socks5.online",
"notify_url"=>"https://xxx.xxx", #付款狀態幕後接收系統
"success_url"=>"https://xxx.xxx", #付款成功時返回
"pending_url"=>"https://xxx.xxx", #付款等待結果時返回(通常用不到)
"fail_url"=>"https://xxx.xxx" #付款失敗時返回
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array (
[pid] => 4W71612502833
[update_code] => YBTM12WIFSRKEX9
)
# 修改訂單(送出付款資訊)
#paymentmethod 值選項有 (1=超商付款, 2=PayPal, 3=支付寶)
<form id="pay" action="https://socks5.online/?mod=create_payment" method="post">
<input type="hidden" name="uid" value="87254">
<input type="hidden" name="paymentmethod" value="1">
<input type="hidden" name="pid" value="4W71612502833">
<input type="hidden" name="update_code" value="YBTM12WIFSRKEX9">
</form>
#之後將直接導入付款連結,付款結果將按照您上一步輸入的網址正確回傳
Array (
[status] => OK
[pid] => 69K1612421166
[uid] => 87254
[amt] => 150
[currency] => HKD
[create_time] => 2021-02-04 23:40:39
[paid_time] => 2021-02-05 23:40:39
[item_id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
[item_name] => 國際 雲路由 600GB 流量
[item_desc1] => desc1
[item_desc2] => desc2
[item_desc3] => desc3
[setting] => Array
(
[host] => sg1.****.com
[port] => 443
[password] => 577a9ec8-****-****-****-d0e6af3e7f91
[speed] => 100Mbps
[quota] => 644245094400
[download] => 0
[upload] => 0
[trojan] => trojan://577a9ec8-****-****-****-d0e6af3e7f91@sg1.****.com:443
)
)
# 查詢訂單
<?php
$url = "https://socks5.online/?mod=query_pid";
$ch = curl_init();
$data = array(
"uid"=>"87254",
"email"=>"admin@socks5.online",
"pid"=>"4W71612502833"
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curl_result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($curl_result);
?>
Array (
[status] => OK
[pid] => 69K1612421166
[uid] => 87254
[amt] => 150
[currency] => HKD
[create_time] => 2021-02-04 23:40:39
[paid_time] => 2021-02-05 23:40:39
[item_id] => a59abba9-2ae7-498a-a6a1-e120d97bfda5
[item_name] => 國際 雲路由 600GB 流量
[item_desc1] => desc1
[item_desc2] => desc2
[item_desc3] => desc3
[setting] => Array
(
[host] => sg1.****.com
[port] => 443
[password] => 577a9ec8-****-****-****-d0e6af3e7f91
[speed] => 100Mbps
[quota] => 644245094400
[download] => 0
[upload] => 0
[trojan] => trojan://577a9ec8-****-****-****-d0e6af3e7f91@sg1.****.com:443
)
)
若您需要協助,請聯繫我們的客服團隊:admin@socks5.online。