Promotions | Hotel Bernini Palace - Luxury 5 stars Hotel
X

BEST RATE GUARANTEED

Arrival
Nights
Rooms Guests  
Special code

Promotions

//----------------------------------SUB STRING FUNCTION----------------------------------------------
function shorten_string($string, $wordsreturned)
/* Returns the first $wordsreturned out of $string. If string
contains more words than $wordsreturned, the entire string
is returned.*/
{
$retval = $string; // Just in case of a problem
$array = explode(" ", $string);
/* Already short enough, return the whole thing*/
if (count($array) {
$retval = $string;
}
/* Need to chop of some words*/
else
{
array_splice($array, $wordsreturned);
$retval = implode(" ", $array)." ...";
}
return $retval;
}
//-------------------------------------------------------------------------------

$booking_page = "en/luxury-hotel-5-stars-florence/book-now";

$doc = new DomDocument();
$doc->load( 'http://feed.bookassist.com/feed/specials_xml.jsp?hotel_id=2367&guide_id=...' );

$specials = $doc->getElementsByTagName( "special" );
foreach( $specials as $special ){

$end_dates = $special->getElementsByTagName("end_date");
$end_date = $end_dates->item(0)->nodeValue;

$special_froms = $special->getElementsByTagName("special_from");
$special_from = $special_froms->item(0)->nodeValue;

$pgs = $special->getElementsByTagName("pg");
$pg = $pgs->item(0)->nodeValue;

$booking_links = $special->getElementsByTagName("booking_link");
$booking_link = $booking_links->item(0)->nodeValue;

$descriptions = $special->getElementsByTagName("description");
$description = $descriptions->item(0)->nodeValue;
$new_desc = shorten_string($description, 4);

$names = $special->getElementsByTagName("name");
$name = htmlspecialchars(strip_tags($names->item(0)->nodeValue), ENT_QUOTES );

$images = $special->getElementsByTagName("image");
$image = $images->item(0)->nodeValue;
$image_large = substr($image, 0, -5). "7.jpg";

echo "

\n";
if($image_large != ""){
echo "
\"$name\"

\n";
}

echo "

\n";

echo "

\n";
echo "

$new_desc

From:
$special_from

\n";
echo "Book Now";

echo "

\n";

$packages = $special->getElementsByTagName( "pck_arr" );
foreach( $packages as $package ){

$pkg_names = $package->getElementsByTagName("pkg_name");
$pkg_name = $pkg_names->item(0)->nodeValue;

//echo "$pkg_name
\n";
}

echo "

\n";

}

?>

The Best Price Guarantee

On our official website, we guarantee the best price available.

100% Secure Payments

To confirm reservation with credit card, this website uses a secure server, according to the universal coding standard Secure Socket Layers (SSL).

Dedicated Assistance

Our staff is always available to assist you during the reservation process and offer you the best solution for your stay. Contact us at +39 055 288621 or via email at bookinghotelbernini@duetorrihotels.com