This is a simple PHP script to return male female and user id as json value will be any random value as you call the script json.php .
Hope this help thanks
user_id = rand(0, 10);
$myObj->male = rand(0, 5);
$myObj->female = rand(0, 5);
$myJSON = json_encode($myObj);
echo $myJSON;
?>