1. Go to this page and download the library: Download graze/dynamark3-client 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/ */
/**
* Any response from the server up until a prompt is encountered.
*
* @return string
*/
public function getResponseText();
/**
* Whether an error prompt was encountered.
*
* @return bool
*/
public function isError();
/**
* The error code returned from the Dynamark 3 server
*
* @return int
*/
public function getErrorCode();
...
$resp = $client->getxml();
if ($resp->isError()) {
echo sprintf('the server responded with error code: [%d]', $resp->getErrorCode());
// look up the error code in the Dynamark 3 protocol docs
return;
}
$xml = $resp->getResponseText();
// do something fun with the xml