<?php
require_once 'lib/api.php';
// some sort of limit?!
session_start();

$ret = '';
$data = array();

if (isset($_GET['name'])) {
    $data['name'] = htmlspecialchars($_GET['name']);
}

if ($data) {
    $ret = api_call('kunde/suchen', $data);
}

header('Content-Type: application/json');
echo json_encode($ret['kunden']);