<html>
<head>
<title>Busch Gardens Wait Times</title>
</head>
<body>
<script src="/sorttable.js"></script>
<style>
.datagrid table { border-collapse: collapse; text-align: left; width: 100%; } .datagrid {font: normal 12px/150% Arial, Helvetica, sans-serif; background: #fff; overflow: hidden; border: 1px solid #8C8C8C; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }.datagrid table td, .datagrid table th { padding: 5px 5px; }.datagrid table thead th {background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8C8C8C), color-stop(1, #7D7D7D) );background:-moz-linear-gradient( center top, #8C8C8C 5%, #7D7D7D 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8C8C8C', endColorstr='#7D7D7D');background-color:#8C8C8C; color:#FFFFFF; font-size: 15px; font-weight: bold; border-left: 1px solid #A3A3A3; } .datagrid table thead th:first-child { border: none; }.datagrid table tbody td { color: #7D7D7D; border-left: 1px solid #DBDBDB;font-size: 12px;border-bottom: 1px solid #E1EEF4;font-weight: normal; }.datagrid table tbody td:first-child { border-left: none; }.datagrid table tbody tr:last-child td { border-bottom: none; }.datagrid table tfoot td div { border-top: 1px solid #8C8C8C;background: #EBEBEB;} .datagrid table tfoot td { padding: 0; font-size: 12px } .datagrid table tfoot td div{ padding: 2px; }.datagrid table tfoot td ul { margin: 0; padding:0; list-style: none; text-align: right; }.datagrid table tfoot li { display: inline; }.datagrid table tfoot li a { text-decoration: none; display: inline-block; padding: 2px 8px; margin: 1px;color: #F5F5F5;border: 1px solid #8C8C8C;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8C8C8C), color-stop(1, #7D7D7D) );background:-moz-linear-gradient( center top, #8C8C8C 5%, #7D7D7D 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8C8C8C', endColorstr='#7D7D7D');background-color:#8C8C8C; }.datagrid table tfoot ul.active, .datagrid table tfoot ul a:hover { text-decoration: none;border-color: #7D7D7D; color: #F5F5F5; background: none; background-color:#8C8C8C;}</style>
<?php
$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL, 'http://seaworldparks.com/en/buschgardens-tampa/Park-Info/Park-Hours?m=1');
curl_setopt($ch2, CURLOPT_REFERER, 'http://seaworldparks.com/en/buschgardens-tampa/Park-Info/Park-Hours?m=1');
curl_setopt($ch2, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_TIMEOUT, 3);
$data2 = curl_exec($ch2);
curl_close($ch2);
// Cut out the data we want
$pos1 = strpos($data2, '<small class="timeframe"> ');
$pos2 = strpos($data2, '</small>', $pos1);
$howfar = $pos2 - $pos1;
$data2 = substr($data2, $pos1, $howfar);
$data2 = str_replace('<small class="timeframe"> ','',$data2);
function download_page($path){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$path);
curl_setopt($ch, CURLOPT_FAILONERROR,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$retValue = curl_exec($ch);
curl_close($ch);
return $retValue;
}
$sXML = download_page('https://lab.defimobile.com/tampa/rides');
$oXML = new SimpleXMLElement($sXML);
if (empty($oXML)) {
echo "<center>There are currently no wait times listed!</center>\n";
} else {
echo "<center><img src='/img/bglogo.gif'><br><strong>Park Hours: " . $data2 . "</strong><br><div class='datagrid'>\n";
echo "<table class='sortable' width='500px'><thead><tr><th>Ride</th><th>Wait Time</th></tr></thead><tbody>\n";
foreach($oXML->ride as $oEntry){
$wait = $oEntry->waitTime;
$ride = $oEntry->title;
$time = $oEntry->lastModified;
$pos = strrpos( $time, '.');
if ($pos !== false) {
$time=substr($time, 0, $pos ); //Hello World
}
$time = strtotime($time);
$fixed = date('l jS \of F Y h:i:s A', $time);
if ($wait == "No Wait"){
$wait = "<font color='green'>No Wait!</font>";
}
$wait = str_replace("min","minutes", $wait);
$ride = str_replace("San Serpent","Sand Serpent",$ride);
if ($oEntry->id < 300){
if ($wait != ""){
echo "<tr><td>" . $ride . "</td><td>" . $wait . "</td></tr>\n";
}}}
echo "<tfoot><tr><td colspan='2'><div id='no-paging'>Last updated on " . $fixed . "</div></tr></tfoot>\n";
echo "</tbody></table></div></center>";
}
?>
<br>
<h1>Lighting Strikes in Hillsborough County</h1>
<img src="http://static.baynews9.com/images/wx/bn9/lightning_hills.jpg">
</body>
</html>