Index: mania_score.php
===================================================================
--- mania_score.php	(revision 292)
+++ mania_score.php	(revision 293)
@@ -1,9 +1,7 @@
-<?
+<?php
 // This file is used by ManiaDrive to upload
 // scores to CQFD Corp website.
 
-require_once('./nusoap/nusoap.php');
-
 // Webservice WSDL URL
 $url = "http://maniadrive.raydium.org/ecrire/tools/maniadrive/WSManiaDrive.php?wsdl";
 
@@ -12,49 +10,23 @@
 raydium_parser_db_get("Generic-Proxy", $proxy, "");
 $proxy=parse_url($proxy);
 
-// Create the client instance
-$client = new soapclient($url, true, $proxy["host"], $proxy["port"]);
+try {
+  // Create the client instance
+  $client = new SoapClient($url, array('proxy_host' => $proxy["host"],
+				       'proxy_port' => (int) $proxy["port"],
+				       )
+			   );
+  // Call the SOAP method
+  $result = $client->ScoreAddNew($name, $track, $score, $version);
 
-// Check for an error
-$err = $client->getError();
-if ($err) {
-    // Log the error 
-    raydium_log('Error: '.$err);
-    $position=0;
-    exit();
-} 
-
-// Parameters
-$parameters = array(
-  'name' => $name,
-  'track' => $track,
-  'score' => $score,
-  'version' => $version
-); 
-
-// Call the SOAP method
-$result = $client->call('ScoreAddNew', $parameters);
-
-// Display the result
-//print_r($result);
-
-// Check for a fault
-if ($client->fault) {
-    raydium_log('Fault: '.$result);
-} else {
-    // Check for errors
-    $err = $client->getError();
-    if ($err) {
-       raydium_log('Error: '.$err);
-    } else {
-        // Display the result
-        $result++;
-        raydium_log('Debug : Level=' . $result);
-    }
-    
+  // Display the result
+  $result++;
+  raydium_log('Debug : Level=' . $result);
+  $position= (int) $result;
 }
+catch (SoapFault $fault) {
+  raydium_log("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})");
+  $position = 0;
+}
 
-$position = (int) $result;
-
-
 ?>