{'xcatresponse'}->{'data'})) { $result="".$testcred->{'xcatresponse'}->{'data'}; if (is_numeric(strpos("Authenticated",$result))) { $_SESSION["xcatpassvalid"]=1; #proven good } else { $_SESSION["xcatpassvalid"]=0; #proven bad } } } } $jdata=array(); if (isset($_SESSION["xcatpassvalid"]) and $_SESSION["xcatpassvalid"]==1) { $jdata["authenticated"]="yes"; } else { $jdata["authenticated"]="no"; } echo json_encode($jdata); ?>