DE ♦ EN

IBAN-BIC.com (Theano GmbH)  » Web Service  » Documentation  » Sample Clients  » Beispiel: PHP

Forgot password?

Contact
us

New customer? Register

Sample PHP 5 SOAP Client

A complete, yet still simple example for an IBAN calculator SOAP client: Calculating German IBANs.

To run it on your own server, download the script (you can use the link at the bottom of the page), fill in your own username and password - the same one as for logging into this website -, put the PHP file onto your own server (needs php5 and the php-soap and openssl packages), and you should be ready to go.

  1. <?php
  2. if (strlen($_REQUEST["action"]) > 0) {
  3.     $client = new SoapClient('https://ssl.ibanrechner.de/soap?wsdl');
  4.     $result = $client->calculate_iban($_REQUEST["country"], $_REQUEST["blz"], $_REQUEST["kontonr"], 'premium subscr. user id', 'password');
  5.     print "Result of SOAP call \$client-&gt;calculate_iban('"._REQUEST["country"]."', '".$_REQUEST["blz"]."', '".$_REQUEST["kontonr"]."', ...):
  6.     <pre>";
  7.     print_r($result);
  8.     print "</pre>";
  9. } else
  10.   print '<form action="sample.php" method="post">
  11. <font face="Verdana,Arial,Helvetica" size="1" color="#3366CC">
  12. <input name="country" type="hidden" value="DE">
  13.    <font face="Verdana,Arial,Helvetica" size="1" color="#3366CC">
  14. Bankleitzahl</font><br/>   <input type="text" size="22" name="blz" value=""/><br/>
  15.    <font face="Verdana,Arial,Helvetica" size="1" color="#3366CC">
  16. Kontonummer:</font><br/>   <input type="text" size="22" name="kontonr" value=""/><br/>
  17.    <input type="submit" style="height:21px;font-size:11px" name="action"
  18. value="IBAN berechnen" title=" IBAN berechnen "/>
  19.    <br/></form>';
  20. ?>