Developer
Posts: 3176
<?php
header("access-control-allow-origin: *");
header("access-control-allow-headers: Content-Type");
$json = file_get_contents('php://input');
$data = json_decode($json);
if($data == null || $data == false || !property_exists($data, "req")) {
exit();
}
$requestId = $data->req;
if($requestId == "networkinfo") {
$resData = new stdClass();
$resData->networkName = "My News Network";
$resData->networkNameShort = "MNN";
$resData->logoBackground = "#ff0000";
$resData->logoText = "#00ff00";
$resData->logoStroke = "#000000";
$resData->taglines = array();
$resData->taglines[] = "My News Network - It's Good Stuff!";
$resData->taglines[] = "You are watching My News Network!";
$cannedResponses = new stdClass();
$cannedResponses->healthcrisis = array();
$cannedResponses->healthcrisis[] = "put your news headline here 1";
$cannedResponses->techunlock = array();
$cannedResponses->techunlock[] = "put your news headline here 1";
$cannedResponses->highunemp = array();
$cannedResponses->highunemp[] = "put your news headline here 1";
$cannedResponses->highunemp[] = "put your news headline here 2";
$cannedResponses->ollargestsettlement = array();
$cannedResponses->ollargestsettlement[] = "put your news headline here";
$cannedResponses->ollargestsettlement[] = "put your news headline here 2";
$cannedResponses->starvation = array();
$cannedResponses->starvation[] = "put your news headline here";
$cannedResponses->starvation[] = "put your news headline here 2";
$cannedResponses->lowapproval = array();
$cannedResponses->lowapproval[] = "put your news headline here";
$cannedResponses->lowsecurity = array();
$cannedResponses->lowsecurity[] = "put your news headline here";
$cannedResponses->lowsecurity[] = "put your news headline here 2";
$cannedResponses->lowentertainment = array();
$cannedResponses->lowentertainment[] = "put your news headline here";
$cannedResponses->lowentertainment[] = "put your news headline here 2";
$cannedResponses->loweducation = array();
$cannedResponses->loweducation[] = "put your news headline here";
$cannedResponses->loweducation[] = "put your news headline here 2";
$resData->responses = $cannedResponses;
echo json_encode($resData);
}
?>