/** * API Demo Skript */ // Check IBAN $url = 'http://www.iban-test.de/api/check/DE123456789101112'; $url .= '?authcode=yourApiKey'; // Save API result as an php Array in variable $result $result = file_get_contents($url); $result = json_decode($result, true); // IBAN valid? See API codes here: http://iban-test-de/api/README.md if ($result['code']== 2100) { echo 'IBAN is valid.'; } // Generate IBAN $url = 'http://www.iban-test.de/api/generate'; $url .= '?authcode=yourApiKey'; $url .= '&countrycode=yourCountryCode'; $url .= '&bankcode=yourBankcode'; $url .= '&accountnumber=yourAccountnumber'; // Save API result as an php Array in variable $result $result = file_get_contents($url); $result = json_decode($result, true); // alle Daten ausgeben var_dump($result); // check if there was an error handling the request if ($result['error']) { echo $result['message']; exit; } // Print out generated IBAN echo $result['iban'];