httpRequest() public static method

Creates HTTP request
public static httpRequest ( string $url, string $method, boolean $return_only_status = false, mixed $content = null, string $header = "" ) : mixed
$url string Url to send the request
$method string HTTP request method (GET, POST, PUT, DELETE, etc)
$return_only_status boolean If set to true, the method would only return response status
$content mixed Content to be sent with HTTP request
$header string Header to be set for the HTTP request
return mixed
 /**
  * Returns information with latest version from phpmyadmin.net
  *
  * @return object JSON decoded object with the data
  */
 public function getLatestVersion()
 {
     if (!$GLOBALS['cfg']['VersionCheck']) {
         return null;
     }
     // Get response text from phpmyadmin.net or from the session
     // Update cache every 6 hours
     if (isset($_SESSION['cache']['version_check']) && time() < $_SESSION['cache']['version_check']['timestamp'] + 3600 * 6) {
         $save = false;
         $response = $_SESSION['cache']['version_check']['response'];
     } else {
         $save = true;
         $file = 'https://www.phpmyadmin.net/home_page/version.json';
         $response = Util::httpRequest($file, "GET");
     }
     $response = $response ? $response : '{}';
     /* Parse response */
     $data = json_decode($response);
     /* Basic sanity checking */
     if (!is_object($data) || empty($data->version) || empty($data->releases) || empty($data->date)) {
         return null;
     }
     if ($save) {
         $_SESSION['cache']['version_check'] = array('response' => $response, 'timestamp' => time());
     }
     return $data;
 }