Return to Snippet

Revision: 548
at July 18, 2006 11:55 by nicolaspar


Initial Code
function getVersionGD() {
		$gd = array();
		$GDfuncList = get_extension_funcs('gd');
		ob_start();
		@phpinfo(INFO_MODULES);
		$output=ob_get_contents();
		ob_end_clean();
		$matches[1]='';
		if (preg_match("/GD Version[ \t]*(<[^>]+>[ \t]*)+([^<>]+)/s",$output,$matches)) {
			$gdversion = $matches[2];
		}
		if ($GDfuncList) {
		 if (in_array('imagegd2', $GDfuncList)) {
			$gd['gd2'] = $gdversion;
		 } else {
			$gd['gd1'] = $gdversion;
		 }
		}
		return $gd;
	}

Initial URL

                                

Initial Description

                                

Initial Title
Php detectar versión GD

Initial Tags

                                

Initial Language
PHP