Vergleich inc/functions_serverstats.php - 1.8.5 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 8Zeile 8
 *
*/


 *
*/


 
/**
* @param int $is_install
* @param string $prev_version
* @param string $current_version
* @param string $charset
*
* @return array
*/

function build_server_stats($is_install=1, $prev_version='', $current_version='', $charset='')
{
$info = array();

function build_server_stats($is_install=1, $prev_version='', $current_version='', $charset='')
{
$info = array();

Zeile 43Zeile 51

// MySQL Version
$info['mysql'] = 0;


// MySQL Version
$info['mysql'] = 0;

	if(array_key_exists('mysql', $phpinfo))

	if(isset($phpinfo['mysql']['Client API version']))

	{
$info['mysql'] = $phpinfo['mysql']['Client API version'];
}

// PostgreSQL Version
$info['pgsql'] = 0;

	{
$info['mysql'] = $phpinfo['mysql']['Client API version'];
}

// PostgreSQL Version
$info['pgsql'] = 0;

	if(array_key_exists('pgsql', $phpinfo))

	if(isset($phpinfo['pgsql']['PostgreSQL(libpq) Version']))

	{
$info['pgsql'] = $phpinfo['pgsql']['PostgreSQL(libpq) Version'];
}

// SQLite Version
$info['sqlite'] = 0;

	{
$info['pgsql'] = $phpinfo['pgsql']['PostgreSQL(libpq) Version'];
}

// SQLite Version
$info['sqlite'] = 0;

	if(array_key_exists('sqlite', $phpinfo))

	if(isset($phpinfo['sqlite']['SQLite Library']))

	{
$info['sqlite'] = $phpinfo['sqlite']['SQLite Library'];
}

// Iconv Library Extension Version
$info['iconvlib'] = 0;

	{
$info['sqlite'] = $phpinfo['sqlite']['SQLite Library'];
}

// Iconv Library Extension Version
$info['iconvlib'] = 0;

	if(array_key_exists('iconv', $phpinfo))

	if(isset($phpinfo['iconv']['iconv implementation'], $phpinfo['iconv']['iconv library version']))

	{
$info['iconvlib'] = html_entity_decode($phpinfo['iconv']['iconv implementation'])."|".$phpinfo['iconv']['iconv library version'];
}

// Check GD & Version
$info['gd'] = 0;

	{
$info['iconvlib'] = html_entity_decode($phpinfo['iconv']['iconv implementation'])."|".$phpinfo['iconv']['iconv library version'];
}

// Check GD & Version
$info['gd'] = 0;

	if(array_key_exists('gd', $phpinfo))

	if(isset($phpinfo['gd']['GD Version']))

	{
$info['gd'] = $phpinfo['gd']['GD Version'];
}

	{
$info['gd'] = $phpinfo['gd']['GD Version'];
}

Zeile 195Zeile 203
	}

// Host URL & hostname

	}

// Host URL & hostname

 
	// Dropped fetching host details since v.1.8.16 as http://www.whoishostingthis.com API seems to be down and this info is not required by MyBB.

	$info['hosturl'] = $info['hostname'] = "unknown/local";
if($_SERVER['HTTP_HOST'] == 'localhost')

	$info['hosturl'] = $info['hostname'] = "unknown/local";
if($_SERVER['HTTP_HOST'] == 'localhost')

	{
$info['hosturl'] = $info['hostname'] = "localhost";
}

// Check the hosting company
if(strpos($_SERVER['HTTP_HOST'], ".") !== false)
{
$host_url = "http://www.whoishostingthis.com/".str_replace(array('http://', 'www.'), '', $_SERVER['HTTP_HOST']);

$hosting = fetch_remote_file($host_url);

if($hosting)
{
preg_match('#We believe \<a href\="http:\/\/www.whoishostingthis.com\/linkout\/\?t\=[0-9]&url\=?([^"]*)" (title="([^"]*)" )target\=\_blank\>([^<]*)\<\/a\>#ism', $hosting, $matches);

$info['hosturl'] = "unknown/no-url";
if(isset($matches[1]) && strlen(trim($matches[1])) != 0 && strpos($matches[1], '.') !== false)
{
$info['hosturl'] = strtolower($matches[1]);
}
else if(isset($matches[3]) && strlen(trim($matches[3])) != 0 && strpos($matches[3], '.') !== false)
{
$info['hosturl'] = strtolower($matches[3]);
}

if(isset($matches[4]) && strlen(trim($matches[4])) != 0)
{
$info['hostname'] = $matches[4];
}
elseif(isset($matches[3]) && strlen(trim($matches[3])) != 0)
{
$info['hostname'] = $matches[3];
}
elseif(isset($matches[2]) && strlen(trim($matches[2])) != 0)
{
$info['hostname'] = str_replace(array('title=', '"'), '', $matches[2][0]);
}
elseif(strlen(trim($info['hosturl'])) != 0 && $info['hosturl'] != "unknown/no-url")
{
$info['hostname'] = $info['hosturl'];
}
else
{
$info['hostname'] = "unknown/no-name";
}
}

	{	
$info['hosturl'] = $info['hostname'] = "localhost";













































	}

if(isset($_SERVER['HTTP_USER_AGENT']))

	}

if(isset($_SERVER['HTTP_USER_AGENT']))

Zeile 270Zeile 235
		$amp = "&amp;";
}


		$amp = "&amp;";
}


	$server_stats_url = 'http://community.mybb.com/server_stats.php?'.$string;

	$server_stats_url = 'https://community.mybb.com/server_stats.php?'.$string;


$return = array();
$return['info_sent_success'] = false;


$return = array();
$return['info_sent_success'] = false;