1. Go to this page and download the library: Download lsolesen/edbbrugs-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lsolesen / edbbrugs-php-sdk example snippets
use EDBBrugs\Client;
use EDBBrugs\Credentials;
use EDBBrugs\RegistrationRepository;
$soap = new \SoapClient('https://www.webtilmeldinger.dk/TilmeldingsFormularV2Ws/Service.asmx?wsdl', array('trace' => 1));
$credentials = new Credentials($username, $password, $school_code);
$client = new Client($credentials, $soap);
$registration_repository = new RegistrationRepository($client);
// Add registrations.
$registrations = array(
array(
'Kartotek' => 'XX', // => 0, // 0 = No, 1 = Yes
'Elev.Mobil' => '75820811',
'Elev.MobilBeskyttet' => 0, // 0 = No, 1 = Yes
'Elev.Email' => '[email protected]',
'Elev.Land' => 'Danmark',
'Elev.Notat' => 'Svend Aage Thomsen er skolens grundlægger',
'Elev.Linje' => 'Fodbold', // optional and specific for a student
// You can add Far, Mor, Voksen - but only one of each
'Voksen.Fornavn' => 'Svend Aage',
'Voksen.Efternavn' => 'Thomsen',
'Voksen.Adresse' => 'Ørnebjergvej 28',
'Voksen.Lokalby' => 'Grejs',
'Voksen.Postnr' => '7100',
'Voksen.Bynavn' => 'Vejle',
'Voksen.Fastnet' => '75820811',
'Voksen.FastnetBeskyttet' => 0, // 0 = No, 1 = Yes
'Voksen.Mobil' => '75820811',
'Voksen.MobilBeskyttet' => 0, // 0 = No, 1 = Yes
'Voksen.Email' => '[email protected]',
'Voksen.Land' => 'Danmark',
)
);
$registration_repository->addRegistrations($registrations);
// Get new registrations.
$registration_repository->getNewRegistrations();
// Get handled registrations.
$registration_repository->getHandledRegistrations();