Abstract / Summary
After you obtain the service package it should be uncompressed, usually this is done inside the root directory of your web server, since it is packed in data file such as zip.
Inside the package there are two files: "wshtml.php" and "wshtml.ini". The "wshtml.php" file is a php script designed mainly to run the service. It should not be altered nor amended at all. "wshtml.ini" configuration file holds simple, yet important configuration settings.
It is important that all files from download package are placed in one directory, so that can be easily accessed, and all files should be set with proper access permissions and attributes depending on your web server.
- PHP >= 5.0.0
- php.ini: allow_url_fopen = On
Unpack downloaded files and place them in desired directory. Then include "wshtml.php" file in your desired php page where service is to appear. Adjust wshtml.ini configurations properly and follow instructions and explanations as described in configuration settings section.
When configuring "wshtml.ini", make sure that correct data is provided that correspond to the provided configuration settings. Follow the instructions strictly and do not override or remove any of the content unless instructed by this documentation. For the convenience, the "wshtml.ini" file is simple and it is easy to use and minimal tech skills are assumed.
As described above the service is easy to install and use when properly configured. The outstanding performance achievement is very likely, however, there are several things to consider. First, the updates are important, so when client service package is updated just follow the procedure as instructed and replace the old files with new ones. Second, client side logic is not to be edited or amended at all, except when instructed. Service on server side is automatically updated and it is transparent to client side. Service on client side, however, may require some seldom updates.
The updates on client side may be due to the changes in core logic of the wshtml.php file as mentioned before. Those changes shoud be very rare. The wshtml.ini may require some changes when some new directive are added. The support team will notify clients accordingly and instruct the clients how to make changes due to update.
HTML service uses global PHP variable $GLOBALS['AdriaticWSHTMLConfig'] for its configuration.
It can be used only before the client script is included (include_once('wshtml.php')).
Any settings from "wshtml.ini" can be overrided using this global variable.
For example, $GLOBALS['AdriaticWSHTMLConfig']['start_page'] = 'en-apartments'; changes the default start page.
The code below shows how to implement an Adriatic HTML Web Service into one of your php pages. Note that the page that holds this code must retain the DTD heading parmateres to reflect a xhtml structure.
We recomend using structure of code as shown below to avod possible mishaps in service configuration.
<?php include_once("wshtml.php"); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Page title</title> <?php $GLOBALS['AdriaticWSHTMLObject']->dispatch(); ?> <!-- here include any custom or modified themes(CSS) --> </head> <body> <?php $GLOBALS['AdriaticWSHTMLObject']->dispatch(); ?> </body> </html>
When using templates there can be differences in the layout of some elements of HTML service due to disparities between CSS styles.
We recommend using light or blank templates which won't affect the content layout significantly.