$api = "https://bluecircle.api.bnbowners.com/offers/?lastminute=1&country=ireland&includeni=1&county={$_REQUEST[region]}&town={$_REQUEST[town]}&imagedimensions=390x260&site=bluecircleclub.com"; $string = file_get_contents($api, FALSE, $context); $deals = json_decode($string); $deals = (array) $deals; $stats = array_shift($deals); $api = "https://bluecircle.api.bnbowners.com/properties/?lastminute=1&country=ireland&county={$_REQUEST[region]}&town={$_REQUEST[town]}&includeni=1&imagedimensions=250x167&site=bluecircleclub.com"; $properties_string = file_get_contents($api, FALSE, $context); $properties = json_decode($properties_string); $properties = (array) $properties; $_REQUEST['country'] = "Ireland"; $_REQUEST['totalbnbs'] = $totalbnbs = count($properties); $pages = ceil($totalbnbs / 12); $minrates = array_column($properties, 'minrate'); FOREACH($minrates AS $i => $rate) : IF($rate == 0) unset($minrates[$i]); ENDFOREACH; $_REQUEST['lowestprice'] = $lowestprice = min($minrates); include("php/seo.php"); $title = $seo->getLMTitle(); $description = $seo->getLMDescription(); $canonical = isset($_REQUEST['town']) ? sprintf("/lastminute/%s/%s", $_REQUEST['region'], $_REQUEST['town']) : sprintf("/lastminute/%s", $_REQUEST['region']); $map = true; include "hfm/head.php"; ?> include "hfm/banner-half.php" ?>
$noend = true; $search = true; include("hfm/foot.php"); ?> $geoopts = array('http'=>array('header'=>"User-Agent: BlueCircleClub\r\n")); $geocontext = stream_context_create($geoopts); $geoapi = "https://nominatim.openstreetmap.org/search?country=ireland&city={$_REQUEST[town]}&county={$_REQUEST[region]}&format=json&limit=1&email=noreply@bnbowners.com"; $geostring = file_get_contents($geoapi, FALSE, $geocontext); ?>