<?php
$query = "OpenSim"; // This is your Query
$json = file_get_contents("http://opensimworld.com/gateway/get.json?cmd=search&q=" . $query);
// Convert JSON string to Array
$someArray = json_decode($json, true);
echo "You searched for: " . $query . " and it returned: <br />";
$arrlength = count($someArray);
for ($x = 0; $x < $arrlength; $x++)
{
echo $someArray[$x]["title"]; // Access Username
echo " | ";
echo "<a href='hop://" . $someArray[$x]["hg_address"] . "'>" . $someArray[$x]["hg_address"] . "</a>"; // HG URL
echo " | ";
echo $someArray[$x]["total_avis"]; // Total Avatars in Region
echo " | ";
echo "<a href='https://opensimworld.com" . $someArray[$x]["url"] . "'>" . $someArray[$x]["url"] . "</a>"; // OpenSimWorld.com URL
echo "<br />";
}
?>