1. Go to this page and download the library: Download blacksenator/fritzsoap 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/ */
blacksenator / fritzsoap example snippets
$fritzbox = new x_contact($url, $user, $password);
$callList = $fritzbox->getCallList();
/**
* setSwitch
*
* automatically generated; complete coding if necessary!
*
* in: NewAIN (string)
* in: NewSwitchState (string)
*
* @param string $aIN
* @param string $switchState
* @return void
*/
public function setSwitch($aIN, $switchState)
{
$result = $this->client->SetSwitch(
new \SoapParam($aIN, 'NewAIN'),
new \SoapParam($switchState, 'NewSwitchState'));
$this->errorHandling($result, 'Could not ... from/to FRITZ!Box');
}
use blacksenator\fritzsoap\x_contact;
$fritzbox = new x_contact; // no credentials needed in this particular case!
$services = $fritzbox->getServiceDescription();
$services->asXML('services.xml');
$fritzbox = new hosts($url, $user, $password);
$meshList = $fritzbox->getMeshList();
$fritzbox = new x_voip($url, $user, $password);
$fritzbox->x_AVM_DE_DialNumber('030399760');