QuickBooks/Utilities.php
static public function GUID()
	{
		$guid = sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',
			mt_rand(0, 65535), mt_rand(0, 65535), 
			mt_rand(0, 65535), 
			mt_rand(0, 4095),  
			bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),
			mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)
			);  	
			
		return $guid;	
	}
static public function GUID()
	{
		$guid = sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',
			mt_rand(0, 65535), mt_rand(0, 65535), 
			mt_rand(0, 65535), 
			mt_rand(0, 4095),  
			bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),
			mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)
			);  	
			
		return $guid;	
	}
Generate a GUID

Note: This is used for tickets too, so it *must* be a RANDOM GUID!

@param boolean $surround
@return string