Faster Json data display
Posted: Sun Jan 05, 2014 11:36 pm
I want to make display Json data download faster on my end
The above page takes 1.1806 seconds to load BUT if you load this page http://census.soe.com/get/ps2/character ... 9515051201 it takes
the server is fast both are fast there should not be that much of a difference
any tips of downloading the above information has this information in it with a var_dump();
Thanks in advance for any help!
Code: Select all
$ApiLink = "http://census.soe.com/get/ps2/characters_online_status/?character_id=5428029729515051201";
$json_decode = (json_decode(file_get_contents($ApiLink), true));
$status = $json_decode["characters_online_status_list"];
if (isset($status)) {
foreach ($status as $key => $value) {
/** STATUS
* ONLINE = 1
* OFFLINE = 0
*/
$status[$key] = $status[$key]["online_status"];
echo $status[$key];
}
}
else {
echo "-";
}
Code: Select all
timing: {
characters_online_status-ms: 3,
total-ms: 3
}
Code: Select all
array (size=1)
0 =>
array (size=2)
'character_id' => string '5428029729515051201' (length=19)
'online_status' => string '0' (length=1)
Thanks in advance for any help!