<?php

include("nusoap/nusoap.php");

$translationmode = $_POST['translationmode'];
$sourcedata = $_POST['sourcedata'];

$soapclient = new soapclient("http://www.xmethods.net/sd/2001/BabelFishService.wsdl", 'wsdl');


// uncomment the next line to see debug messages
// $soapclient->debug_flag = 1;

// create a proxy so that WSDL methods can be accessed directly
$proxy = $soapclient->getProxy();


// invoke the method
$result = $proxy->BabelFish($translationmode, $sourcedata);

// send the result of the getRate method back to the user

// send the result to the client
Header("Content-Length: " . strlen($result));

echo($result);
?>