yacht4web provides a technology called search engine (search engine) that allows access to two methods that are list of ads And the viewing boat ad. Both are customizable and available in 9 languages.
To integrate with your site you can choose two technologies, Embedded Http Request method described in this section or the more complex but versatile REST APIs.
This method is the mostù simple and quick and allows you to include in your ad listing site, with minimal intervention,
Is to create a PHP file that contains your header (header), a navigation bar (toolbar) and the foot of the page (footer)
Inside the body then we will search engine by yacht4web. The colours and many parameters are configurable through the section, in the user account.
Example of integration announcements list
<!-- your Header ----->
<link href="https://cdn.yacht4web.com/css/1205/ywEngine.css" rel="stylesheet" type="text/css" />
<!-- your Navigation Bar ----->
<!-- Yacht4web engine core ----->
<div>
<?php
error_reporting(~0); ini_set('display_errors', 1); // <-- only for debug
function _add($sz,$szAdd) {
if (strlen($sz)) $sz=$sz."&";
$sz=$sz.$szAdd;
return $sz;
}
$appId='[appid]'; // yacht4web appId key
$idLang=isset($_GET["lang"])?$_GET["lang"]:"it"; // Choose ads language: en,fr,it,de,es,cn,ru,pt,ar
// Get query params
$szQuery=$_SERVER['QUERY_STRING'];
if (!strstr($szQuery,"appid=")) $szQuery=_add($szQuery,"appid=".$appId);
if (!strstr($szQuery,"nohf=")) $szQuery=_add($szQuery,"nohf=1");
if (!strstr($szQuery,"_order=")) $szQuery=_add($szQuery,"_order=SHIP%20ASC");
$url= "https://".$idLang.".yacht4web.com/srch?".$szQuery;
$data = file_get_contents($url);
echo $data;
?>
</div>
<!-- your Footer ----->
Highlights
Integrate the list is quick, but some points are needed to allow to structure yacht4web the service properly.
All arguments/parameters are passed to the application yacht4web/srch: make sure you don't use " internally " parameters with the same name, used by the search engine (e.g. yacht4web appid or w).
An important parameter è lang containing two letters corresponding to the language from display.
Form (form) search/search
Through the search engine's setup, you can indicate if you wish to have a search form operated by yacht4web.
Alternatively you can indicate through the filter parameter of the ads that want to extract
The specifics of possible parameters find described here
The boat can be viewed in two formats
The parameter head = 1 indicates that you want the heading of the company.
The parameter nohf = 1 indicates that you do not want the standard html header yacht4web.
The parameter lang the desired language
<?php
$appId='[appId]'; // Id User
$idLang=isset($_GET["lang"])?$_GET["lang"]:"it"; // Choose language: en,fr,it,de,es,cn,ru,pt,ar
$idBoat=isset($_GET["id"])?$_GET["id"]:0; // idBoat
error_reporting(~0); ini_set('display_errors', 1); // <-- remove after test
if ($idBoat>0) {
$url= "https://".$idLang.".yacht4web.com/boatc?appid=".$appId."&id=".$idBoat;
$url.="&mode=dett&head=1&nohf=1";
$data = file_get_contents($url);
echo $data;
} else {
printf("no boat selection");
}
?>