<?php
$url="http://thebot.net/api/post2.php";
$c = file_get_contents($url);
$c = utf8_encode($c);
$r = json_decode($c, true);
$user=$r->{'username'};
$gr1=$r->{'usergroup'};
$gr2=$r->{'secondary'};
$posts=$r->{'posts'};
//$action=switch($gr2);
if(is_array($gr2) && !(in_array("Coder",$gr2)))
{...