public static function Convert($amount,$from,$to)
	{
		$converted_amount = 0;
		
		$qs = $amount . ' ' . $from . ' in ' . $to;
		$url = "http://www.google.com/search?q=" . urlEncode( $qs );
		
		$g_response = strip_tags( HttpRequest::Get($url) );
		
		if (preg_match("/Rates provided for information only - see disclaimer./i", $g_response))
		{
			$matches = array();
			preg_match( '/= ([0-9\s\.,]+)/', $g_response, $matches );
			if ($matches[1])
			{
				$converted_amount = $matches[1];
			}
			else
			{
				// this should never occur unless google changes the output formatting of the search results
				throw new Exception("Unable to parse response from google");
			}
			
		}
		else
		{
			throw new Exception("The google search result does not appear to contain currency information");
		}
		
		return $converted_amount;
	}