get提交buy.php
http://4235g.com/extensions/buy.php?count=3&period=30&country=us&type=socks
buy.php 内容如下
<?php error_reporting(0);
$count = $_GET['count'];
$period = $_GET['period'];
$country = $_GET['country'];
$type = $_GET['type'];
$specialCountries = ['ru', 'br', 'ee', 'ua', 'us', 'ca'];
$version = in_array($country, $specialCountries) ? '3' : '4';
header('Content-Type: application/json');
// 构建API URL
$apiUrl = "https://xz1xx.net/api/a180de66d2-60d8d2ea61-4dsfgs/buy?count=$count&period=$period&version=$version&country=$country&type=$type";
echo file_get_contents($apiUrl);
?>
get提交buy返回的结果如下
得到返回结果
{
"status": "yes",
"user_id": "51618",
"balance": "0.08",
"currency": "USD",
"date_mod": "2025-09-12 02:43:22",
"list_count": 3,
"list": {
"34372615": {
"id": "34372615",
"version": "3",
"ip": "70.59.205.230",
"host": "70.59.205.230",
"port": "9963",
"user": "Nbg111",
"pass": "c2g111",
"type": "socks",
"country": "us",
"date": "2025-09-12 02:43:22",
"date_end": "2025-10-12 02:43:22",
"unixtime": 1757634202,
"unixtime_end": 1760226202,
"descr": "",
"active": "1"
},
"34372616": {
"id": "34372616",
"version": "3",
"ip": "67.59.205.242",
"host": "67.59.205.242",
"port": "9269",
"user": "22nUt",
"pass": "c222aL",
"type": "socks",
"country": "us",
"date": "2025-09-12 02:43:22",
"date_end": "2025-10-12 02:43:22",
"unixtime": 1757634202,
"unixtime_end": 1760226202,
"descr": "",
"active": "1"
},
"34365399": {
"id": "34365399",
"version": "3",
"ip": "12.236.138.20",
"host": "12.236.138.20",
"port": "9679",
"user": "9JQ3Mc",
"pass": "Yv33ke",
"type": "socks",
"country": "us",
"date": "2025-09-11 18:34:42",
"date_end": "2025-10-11 18:34:42",
"unixtime": 1757604882,
"unixtime_end": 1760196882,
"descr": "",
"active": "1"
}
},
"page": 1
}
问题:buy.php怎么写整理以上返回的数据,得到以下最终我要的结果
70.59.205.230:9963:Nbg111:c2g111
67.59.205.242:9269:22nUt;c222aL
12.236.138.20;9679:9JQ3Mc;Yv33ke
buy.php里应该怎么写,整理返回数据得到以上结果