Really i need help

i have a long time trying to fix my problem and i did not. so please help me…

i have a web service at this url

i use hotel search file with HotelSearch method and method will retrieve xml file contains the matched data.

the varialbe that i made post with it is named : HotelData

the data of the variable is a string file that contains an xml data like this


i am trying to get the result by posting HotelData but i did not get the xml result file
so can anyone help me
i will post my code in next thread

my code is :

class myClass {
  var $HotelData;
  function myClass() 
   $this->HotelData = '<CityID>388</CityID>	<UserName>admin</UserName>	<UserPassword>admin</UserPassword>	<DateFrom>4/12/2010</DateFrom>	<DateTo>4/13/2010</DateTo>	<NumberOfRooms>2</NumberOfRooms>	<Room>		<RoomSerial>1</RoomSerial>		<Adults>1</Adults>		<Child>			<ChildSerial>1</ChildSerial>			<ChildAge>5</ChildAge>		</Child>	</Room>	<Room>		<RoomSerial>2</RoomSerial>		<Adults>2</Adults>		<Child>			<ChildSerial>1</ChildSerial>			<ChildAge>8</ChildAge>		</Child>	</Room>	<Room>		<RoomSerial>3</RoomSerial>		<Adults>3</Adults>		<Child>		</Child>	</Room>	<CurrencyID>162</CurrencyID>';

$data = new myClass();
$postdata = http_build_query($data);

$opt['http']['method'] = "POST";
$opt['http']['header'] = "Content-type: application/x-www-form-urlencoded";
$opt['http']['content'] = $postdata;

$context = stream_context_create($opt);

print $result = file_get_contents("",false,$context);
$filename = 'test.xml';
$somecontent = $result;
unlink ('test.xml');
 fopen('test.xml', 'w'); 
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {

    // In our example we're opening $filename in append mode.
    // The file pointer is at the bottom of the file hence
    // that's where $somecontent will go when we fwrite() it.
    if (!$handle = fopen($filename, 'a')) {
         echo "Cannot open file ($filename)";

    // Write $somecontent to our opened file.
    if (fwrite($handle, $somecontent) === FALSE) {
        echo "Cannot write to file ($filename)";

   // echo "Success, wrote ($somecontent) to file ($filename)";


} else {
    echo "The file $filename is not writable";