<?php 
$msg = "";
$fahrenheit = $_GET['args'];
$phone = $_GET['phone'];
$celsius = convert_to_celsius($fahrenheit);
$msg = "$fahrenheit degrees Fahrenheit is $celsius degrees Celsius";

echo generate_xml($msg);

function convert_to_celsius($f) {
	return ($f-32)*(5.0/9.0);
}

function generate_xml($msg) {
   $resp  = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response><reply>";
   $resp .= "<text><![CDATA[$msg]]></text>";
   $resp .= "</reply></response>";
   return $resp;
}
?>