Untitled
unknown
php
2 years ago
543 B
2
Indexable
Never
<?php function urlJsonGetContent($url){ $tempData = file_get_contents($url); $tempData = json_decode($tempData, true); return $tempData; } function json2xport($json_data) { foreach ($json_data as $portNum => $portAuth) { $user = $portAuth["user"]; $password = $portAuth["password"]; $ip = $portAuth["ip"]; $token = $portAuth["token"]; // $tempData[$portNum] = "{$portNum}:{$user}:{$password}:{$ip}:{$token}"; $tempData .= "{$portNum}:{$user}:{$password}:{$ip}<br>"; } return $tempData; }