/ Published in: PHP

requires MagpieRSS. copy and paste into html head tag, then edit zipcode variable to reflect what weather you want to show.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $zipcode = 94704; require_once('magpierss/rss_fetch.inc'); $url = "http://rss.weather.com/weather/rss/local/" . $zipcode . "?cm_ven=LWO&cm_cat=rss&par=LWO_rss"; $rss = fetch_rss($url); foreach ($rss->items as $item) { $desc[] = $item['description']; } echo "<LINK REL=\"SHORTCUT ICON\" HREF=\"" . $icon . "\">"; ?>
Comments
