While pissing about at work today, I found out about this SOAP buisniss. It sounded pritty neat - so I pissed about with it.
This is what I made.
STEP 1: Download NuSOAP from http://dietrich.ganx4.com/nusoap
STEP 2: Upload it to your php-enablied WebSpace
STEP 3: Create the following PHP file'n' upload
<?php
require_once('nusoap.php'); // Point to the NuSoap file
global $tranmode,$sourcedata;
// Check they are searching for something
if ($sourcedata) {
$params = array("translationmode" => $language_mode, "sourcedata" => $txt_2_translate);
$soapclient = new soapclient('http://www.xmethods.net/sd/2001/BabelFishService.wsdl','wsdl');
$resultdatachose = $soapclient->call('BabelFish',$params);
}
?>
<head>
<title>uM Translation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-control" content="no-cache">
<style type="text/css">
<!--
textarea, select, input {
font-family: Arial, Helvetica, sans-serif;
color: #FFFF00;
background-color: #999999;
border: thin groove #FFFFFF;
}
body {
font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<body bgcolor="#CCCCCC" text="#000000" link="#666666" vlink="#666666" alink="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form action ="#" method = "POST" >
<p> </p>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="173"><table width="5" border="0" align="center" cellpadding="5" cellspacing="5" bordercolor="#000000">
<tr>
<td colspan="2"><font face="Arial, Helvetica, sans-serif"><strong>TRANSLATE
SOMETHING....</strong></font></td>
</tr>
<tr>
<td>Translate from:
<select name="language_mode">
<option value="en_zh">English
to Chinese</option>
<option value="en_fr">English
to French</option>
<option value="en_de" >English
to German</option>
<option value="en_it" >English
to Italian</option>
<option value="en_ja" >English
to Japanese</option>
<option value="en_ko" >English
to Korean </option>
<option value="en_pt" >English
to Portuguese</option>
<option value="en_es" >English
to Spanish</option>
<option value="zh_en" >Chinese
to English </option>
<option value="fr_en" >French
to English</option>
<option value="fr_de" >French
to German</option>
<option value="de_en" >German
to English </option>
<option value="de_fr">German
to French</option>
<option value="it_en" >Italian
to English</option>
<option value="ja_en" >Japanese
to English </option>
<option value="ko_en">Korean
to English</option>
<option value="pt_en" >Portuguese
to English</option>
<option value="ru_en" >Russian
to English </option>
<option value="es_en" >Spanish
to English</option>
</select> </td>
<td> <div align="right">
<input type="submit" name="Submit" value="Convert now">
</div></td>
</tr>
<tr>
<td colspan="2"> <div align="left">
<textarea cols="80" rows="5" name="txt_2_translate"><? echo $txt_2_translate; ?></textarea>
</div></td>
</tr>
<tr>
<td colspan="2"><font face="Arial, Helvetica, sans-serif"><strong>Result:</strong></font></td>
</tr>
<tr bgcolor="#999999">
<td colspan="2"> <font face="Arial, Helvetica, sans-serif">
<? echo $resultdatachose; ?>
</font></td>
</tr>
</table>
</form>
STEP 4: Upload at Test.
This all works perfictly on my server at http://www.u-muppet.co.uk/trans.php .
Im not sure if this is usefull for anyone, but apparnetly Amazon and Google both use SOAP or 'wsdl'. It would be interesting to deveolop a website that takes the prices and compares - ovbously adding in your 'recomened From' bonus-code thinggy 😃
Anyway, hope you all like it.
Meh'