Sunday 7 August 2011

google-weather-api

<div dir="ltr" style="text-align: left;" trbidi="on">
<h1>
<?php print $information[0]->city['data']; ?></h1>
<h2>
Today's weather</h2>
<div class="weather">
       
<img src="<?php 'http://www.google.com' . $current[0]->icon['data']?>" alt="weather"?>
<span class="condition">
<?php echo $current[0]->temp_f['data'] ?>&deg; F,
<?php echo $current[0]->condition['data'] ?>
</span>
</div>
<h2>
Forecast</h2>
<?php foreach ($forecast_list as $forecast) : ?>
<div class="weather">
<img src="<?php 'http://www.google.com' . $forecast->icon['data']?>" alt="weather"?>
<div>
<?php echo $forecast->day_of_week['data']; ?></div>
<span class="condition">
<?php echo $forecast->low['data'] ?>&deg; F - <?php $forecast->high['data'] ?>&deg; F,
<?php echo $forecast->condition['data'] ?>
</span>
</div>

<?php endforeach ?>
</div>

No comments: