use json method to find phpmyadmin version (courtesy WvR)
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once("toolkit.php");
|
require_once("toolkit.php");
|
||||||
|
|
||||||
$pma_api = file_get_contents("http://www.phpmyadmin.net/home_page/downloads.php");
|
$pma_api = json_decode(file_get_contents("http://www.phpmyadmin.net/home_page/version.json"));
|
||||||
if( preg_match("/>phpMyAdmin\-([0-9\.]+)\-all\-languages\.tar\.gz</", $pma_api, $matches) ) {
|
if(is_object($pma_api) && strlen($pma_api->version)>0) {
|
||||||
$pma_current = $matches[1];
|
$pma_current = $pma_api->version;
|
||||||
verbose("Current PHPMyAdmin version: $pma_current", 1);
|
verbose("Current PHPMyAdmin version: $pma_current", 1);
|
||||||
} else {
|
} else {
|
||||||
die("Unable to determine current PHPMyAdmin version, exiting\n");
|
die("Unable to determine current PHPMyAdmin version, exiting\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user