This page describes how gathering accomodations offers through a CGI (Common Gateway Interface) nammed holigays.php (version 1.00),
and how to integrate search result in your web portail.
1) Calling CGI to request database
2) RSS 1.0 :: XML query result
3) ATOM 2.0 :: XML query result
4) ICAL :: query result
5) Agregation - How to use result
RSS is a Web content syndication format. Its name is an acronym for Really Simple Syndication.
RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.
The XML file just built content result of query according CGI parameters with list of offers (<item> tag) :
<item>
<title>Establishment Name</title>
<link>URL (adress) to load full information of this offer, including offer ID</link>
<description>Offer description</description>
<pubDate>GMT Date/Time offer was posted</pubDate>
<category>Kind of accomodation (Bed and Breakfast, Home eXchange/Swapping or Vacation let/Rental)</category>
</item>
ATOM 2.0 - XML query result
Atom is an XML-based file format intended to allow lists of information, known as "feeds", to be synchronised between publishers and consumers. Feeds are composed of a number of items, known as "entries", each with an extensible set of attached metadata. Read this :
atompub.org.
The XML file just built content result of query according CGI parameters with list of offers (<item> tag) :
<entry>
<title>Establishment Name</title>
<id>URL (adress) to load full information of this offer, including offer ID</id>
<link href="URL (adress) to load full information of this offer, including offer ID">
<content>Offer description</content>
<udpated>GMT Date/Time offer was updated</updated>
<published>GMT Date/Time offer was posted</published>
<category term="Kind of accomodation (Bed and Breakfast, Home eXchange/Swapping or Vacation let/Rental)">
</entry>
ICAL - query result
Coming soon
Agregation - How to use result
When XML file genereted (these samples using RSS output), you can use these PHP functions :
simplexml_load_file() : Interprets an XML file into an object.
xml_parse() : Parses XML data while firing events for the specified XML parser.
xslt_process() for XSL-T mechanisme : Applies a stylesheet contained in one string to XML contained in another, placing the result in a third string.
Otherwhile it's possible to write specific code (a parser) to read/print XML result. Or use direclty CSS technology (Cascading Style Sheet) based on first request (Bed Breakfast in BE):