public static function _convertToUnixtime ($str)
	{
		
		// Set unixtime
		
		$unixtime	= 0;
		
		// If in a yyyy-mm-dd hh:ii:ss (MySQL Date Time) format
		
		if (preg_match ('/^(\d{4})\D{1}(\d{2})\D{1}(\d{2}) (\d{2}):(\d{2}):(\d{2})$/', $str, $matches))
		{
			$unixtime	= mktime ($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
		}
		
		// Else if in yyyy-mm-dd
		
		else if (preg_match ('/^(\d{4})\D{1}(\d{2})\D{1}(\d{2})$/', $str, $matches))
		{
			$unixtime	= mktime (0, 0, 0, $matches[2], $matches[3], $matches[1]);
		}
		
		// Else if dd-mm-yyyy hh:ii:ss (UK Format)
		
		else if (preg_match ('/^(\d{2})\D{1}(\d{2})\D{1}(\d{4}) (\d{2}):(\d{2}):(\d{2})$/', $str, $matches))
		{
			$unixtime	= mktime ($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]);
		}
		
		// Else if in dd-mm-yyyy
		
		else if (preg_match ('/^(\d{2})\D{1}(\d{2})\D{1}(\d{4})$/', $str, $matches))
		{
			$unixtime	= mktime (0, 0, 0, $matches[2], $matches[1], $matches[3]);
		}
		
		// else if a timestamp
		
		else if (preg_match('/^\d+$/', $str))
		{
			$unixtime = $str;
		}
		
		// Return unixtime
		
		return $unixtime;
		
	}