function getNotifications() { $rm = new Response_Methods(); if ($_SERVER['REQUEST_METHOD'] == "GET") { $result = $rm->inValidServerMethod(); return $result; } //Check request url is https or not if (!empty($_SERVER["HTTPS"])) { if ($_SERVER["HTTPS"] !== "off") { $USERID = trim($_POST['userId']); //Get Request From Device $getArrayList = array(); if ($USERID == "") { $result = $rm->fields_validation(); return $result; } else { $result = $rm->notificationList($USERID); return $result; } //end of first else } else { $result = $rm->ssl_error(); return $result; } } else { $result = $rm->ssl_error(); return $result; } }