PHP code example of yocto / yoclib-wbxml
1. Go to this page and download the library: Download yocto/yoclib-wbxml 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/ */
yocto / yoclib-wbxml example snippets
use YOCLIB\WBXML\CodePages\ExchangeActiveSync;
use YOCLIB\WBXML\WBXMLEncoder;
use YOCLIB\WBXML\WBXMLException;
$xml = '<FolderSync/>';
$codePages = ExchangeActiveSync::getCodePages();
$encoder = new WBXMLEncoder($codePages);
try{
$binary = $encoder->encode($xml);
}catch(WBXMLException $e){
//TODO
}
use YOCLIB\WBXML\CodePages\ExchangeActiveSync;
use YOCLIB\WBXML\WBXMLDecoder;
use YOCLIB\WBXML\WBXMLException;
$binary = "\x03\x01\x6a\x00\x00\xff\xff";
$codePages = ExchangeActiveSync::getCodePages();
$decoder = new WBXMLDecoder($codePages);
try{
$xml = $decoder->decode($binary);
}catch(WBXMLException $e){
//TODO
}