<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JiveBay &#187; Web Development</title>
	<atom:link href="http://jivebay.com/category/web/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://jivebay.com</link>
	<description>Web Development, Code Snippets, Technology, Reviews and Random Stuff Blog</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:39:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Calculating the Moon Phase Part 2</title>
		<link>http://jivebay.com/2010/01/04/calculating-the-moon-phase-part-2/</link>
		<comments>http://jivebay.com/2010/01/04/calculating-the-moon-phase-part-2/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 21:54:52 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=627</guid>
		<description><![CDATA[Here is some PHP code to calculating the Lunar Phase of the Moon. It also tells the ecliptic latitude and longitude in degrees, the moon's distance in Earth radii, the moon's age in days from new moon and zodiac.]]></description>
			<content:encoded><![CDATA[<p>In an <a href="http://jivebay.com/2008/09/07/calculating-the-moon-phase/">older post about Calculating the Moon Phase</a>, I converted the some code I found to PHP. However the <a href="http://home.att.net/%7Esrschmitt/script_moon_phase.html">Lunar Phase Calculator</a> has some more information (ecliptic latitude and longitude in degrees, the moon&#8217;s distance in Earth radii, etc.), the other one doesn&#8217;t, so I went ahead and converted it from JavaScript to PHP.<br />
<span id="more-627"></span><br />
<code><br />
&lt;?php<br />
/*<br />
Based on the JavaScript<br />
Lunar Phase Calculator<br />
by Stephen R. Schmitt</p>
<p>http://home.att.net/~srschmitt/script_moon_phase.html</p>
<p>which was adapted from a BASIC program from the Astronomical Computing column of Sky &amp; Telescope, April 1994<br />
*/<br />
function isdayofmonth($month, $day, $year)<br />
{<br />
    $dim = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);<br />
    if ($month != 2)<br />
    {<br />
        if (1 &lt;= $day &amp;&amp; $day &lt;= $dim[$month - 1])<br />
            return true;<br />
        else<br />
            return false;<br />
    }<br />
    $feb = $dim[1];<br />
    if (isleapyear($year))<br />
    {<br />
        $feb++;// is leap year<br />
    }<br />
    if (1 &lt;= $day &amp;&amp; $day &lt;= $feb)<br />
    {<br />
        return true;<br />
    }<br />
    return false;<br />
}<br />
function isleapyear($year)<br />
{<br />
    $a = floor($year - 4 * floor($year / 4));<br />
    $b = floor($year - 100 * floor($year / 100));<br />
    $c = floor($year - 400 * floor($year / 400));<br />
    // possible leap year<br />
    if ($a == 0)<br />
    {<br />
        if ($b == 0 &amp;&amp; $c != 0)<br />
            return false;// not leap year<br />
        else<br />
            return true;// is leap year<br />
    }<br />
    return false;<br />
}<br />
// compute moon position and phase<br />
function moon_posit($month = null, $day = null, $year = null)<br />
{<br />
    $moon = array();<br />
    if(!isdayofmonth($month, $day, $year))<br />
    {<br />
        $moon[&#039;errors&#039;] = &#039;Invalid date&#039;;<br />
    }<br />
    else<br />
    {<br />
        $moon[&#039;errors&#039;] = null;<br />
        $age = 0.0;// Moon&#039;s age in days from New Moon<br />
        $distance = 0.0;// Moon&#039;s distance in Earth radii<br />
        $latitude = 0.0;// Moon&#039;s ecliptic latitude in degrees<br />
        $longitude = 0.0;// Moon&#039;s ecliptic longitude in degrees<br />
        $phase = &#039;&#039;;<br />
        $zodiac = &#039;&#039;;<br />
        $YY = 0;<br />
        $MM = 0;<br />
        $K1 = 0;<br />
        $K2 = 0;<br />
        $K3 = 0;<br />
        $JD = 0;<br />
        $IP = 0.0;<br />
        $DP = 0.0;<br />
        $NP = 0.0;<br />
        $RP = 0.0;<br />
        // calculate the Julian date at 12h UT<br />
        $YY = $year - floor((12 - $month) / 10);<br />
        $MM = $month + 9;<br />
        if ($MM &gt;= 12)<br />
        {<br />
            $MM = $MM - 12;<br />
        }<br />
        $K1 = floor(365.25 * ($YY + 4712));<br />
        $K2 = floor(30.6 * $MM + 0.5);<br />
        $K3 = floor(floor(($YY / 100) + 49) * 0.75) - 38;<br />
        $JD = $K1 + $K2 + $day + 59;// for dates in Julian calendar<br />
        if ($JD &gt; 2299160)<br />
        {<br />
            $JD = $JD - $K3;// for Gregorian calendar<br />
        }<br />
        // calculate moon&#039;s age in days<br />
        $IP = normalize(($JD - 2451550.1) / 29.530588853);<br />
        $age = $IP * 29.53;<br />
        if ($age &lt;  1.84566)<br />
            $phase = &#039;NEW&#039;;<br />
        else if ($age &lt;  5.53699)<br />
            $phase = &#039;Evening crescent&#039;;<br />
        else if ($age &lt;  9.22831)<br />
            $phase = &#039;First quarter&#039;;<br />
        else if ($age &lt; 12.91963)<br />
            $phase = &#039;Waxing gibbous&#039;;<br />
        else if ($age &lt; 16.61096)<br />
            $phase = &#039;FULL&#039;;<br />
        else if ($age &lt; 20.30228)<br />
            $phase = &#039;Waning gibbous&#039;;<br />
        else if ($age &lt; 23.99361)<br />
            $phase = &#039;Last quarter&#039;;<br />
        else if ($age &lt; 27.68493)<br />
            $phase = &#039;Morning crescent&#039;;<br />
        else<br />
            $phase = &#039;NEW&#039;;<br />
        $IP = $IP * 2 * pi();// Convert phase to radians<br />
        // calculate moon&#039;s distance<br />
        $DP = 2 * pi() * normalize(($JD - 2451562.2) / 27.55454988);<br />
        $distance = 60.4 - 3.3 * cos($DP) - 0.6 * cos(2 * $IP - $DP) - 0.5 * cos(2 * $IP);<br />
        // calculate moon&#039;s ecliptic latitude<br />
        $NP = 2 * pi() * normalize(($JD - 2451565.2) / 27.212220817);<br />
        $latitude = 5.1 * sin($NP);<br />
        // calculate moon&#039;s ecliptic longitude<br />
        $RP = normalize(($JD - 2451555.8) / 27.321582241);<br />
        $longitude = 360 * $RP + 6.3 * sin($DP) + 1.3 * sin(2 * $IP - $DP) + 0.7 * sin(2 * $IP);<br />
        if ($longitude &lt;  33.18)<br />
            $zodiac = &#039;Pisces&#039;;<br />
        else if ($longitude &lt;  51.16)<br />
            $zodiac = &#039;Aries&#039;;<br />
        else if ($longitude &lt;  93.44)<br />
            $zodiac = &#039;Taurus&#039;;<br />
        else if ($longitude &lt; 119.48)<br />
            $zodiac = &#039;Gemini&#039;;<br />
        else if ($longitude &lt; 135.30)<br />
            $zodiac = &#039;Cancer&#039;;<br />
        else if ($longitude &lt; 173.34)<br />
            $zodiac = &#039;Leo&#039;;<br />
        else if ($longitude &lt; 224.17)<br />
            $zodiac = &#039;Virgo&#039;;<br />
        else if ($longitude &lt; 242.57)<br />
            $zodiac = &#039;Libra&#039;;<br />
        else if ($longitude &lt; 271.26)<br />
            $zodiac = &#039;Scorpio&#039;;<br />
        else if ($longitude &lt; 302.49)<br />
            $zodiac = &#039;Sagittarius&#039;;<br />
        else if ($longitude &lt; 311.72)<br />
            $zodiac = &#039;Capricorn&#039;;<br />
        else if ($longitude &lt; 348.58)<br />
            $zodiac = &#039;Aquarius&#039;;<br />
        else<br />
            $zodiac = &#039;Pisces&#039;;<br />
        // so longitude is not greater than 360!<br />
        if ($longitude &gt; 360)<br />
            $longitude = $longitude - 360;<br />
        $moon[&#039;age&#039;] = round($age, 2);<br />
        $moon[&#039;distance&#039;] = round($distance, 2);<br />
        $moon[&#039;latitude&#039;] = round($latitude, 2);<br />
        $moon[&#039;longitude&#039;] = round($longitude, 2);<br />
        $moon[&#039;phase&#039;] = $phase;<br />
        $moon[&#039;zodiac&#039;] = $zodiac;<br />
    }<br />
    return $moon;<br />
}<br />
// normalize values to range 0...1<br />
function normalize($v)<br />
{<br />
    $v = $v - floor($v);<br />
    if ($v &lt; 0)<br />
    {<br />
        $v++;<br />
    }<br />
    return $v;<br />
}<br />
?&gt;<br />
</code></p>
<p>And to use it, you can do something like this<br />
<code><br />
&lt;?php<br />
include(&#039;moon2.php&#039;);<br />
$date = time();<br />
$year = date(&#039;Y&#039;, $date);<br />
$month = date(&#039;n&#039;, $date);<br />
$day = date(&#039;j&#039;, $date);<br />
$moon = moon_posit($month, $day, $year);<br />
//debug results<br />
echo &#039;&lt;pre&gt;&#039;;<br />
print_r($moon);<br />
echo &#039;&lt;/pre&gt;&#039;;<br />
if ($moon[&#039;errors&#039;] === null)<br />
{<br />
    //output and format what you want<br />
}<br />
else<br />
{<br />
    //handle error how you want, perhaps give error message and then show today&#039;&#039;s moon info<br />
}<br />
?&gt;<br />
</code></p>
<p>I haven&#8217;t figured out how to get the percentage of illumination of the moon though.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=627&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2010/01/04/calculating-the-moon-phase-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RSS Cron Job</title>
		<link>http://jivebay.com/2009/12/14/rss-cron-job/</link>
		<comments>http://jivebay.com/2009/12/14/rss-cron-job/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 03:45:46 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=233</guid>
		<description><![CDATA[Tired of your web host with limited Cron Jobs, slow caching or think the Poor Man's Cron Job sucks? Try creating an RSS feed and then let Google Reader hit your page and force a RSS Cron Job to take place.]]></description>
			<content:encoded><![CDATA[<p> If you are on shared web host, you might not have the ability to run lots of cron jobs or be limited to a certain number per hour or day. You might know about the &#8220;Poor Man&#8217;s Cron Job&#8221;, which is basically not to run a task (usually caching some data or fetching a feed, api, etc.) in the background until someone visits a page. Which isn&#8217;t ideal, because often the page will be slow or sometimes it won&#8217;t be up to date until the second visit (if you run that task after outputting the cached data).</p>
<p>Well one way to get around this is to setup an RSS feed for the data you are caching or outputting and access it with a query string such as &#8220;?rss=2.0&#8243; or <strong>http://example.com/index.php?rss=2.0</strong>. Then you can check to see if the RSS variable was passed and output a RSS feed with just enough data for a feed, no need to put sensitive data in there or anything. I would suggest putting in a <strong>ttl</strong> node in the RSS feed and set it to something the aggregators like <a href="http://www.google.com/reader">Google Reader</a>, should obey (that way they hit your page more or less frequently, depending on your needs). The <strong>item</strong> portion of an RSS feed only needs a title or a description, although its probably a good idea to put some kind of <strong>guid</strong> in there (check the <a href="http://cyber.law.harvard.edu/rss/rss.html">RSS 2.0 spec</a> for more info on creating RSS feeds).</p>
<p>Anyway here is some sample code. It isn&#8217;t complete but gives you an idea what I mean.<br />
<code><br />
if ($_GET[&#039;rss&#039;] == 2.0)<br />
{<br />
	//create RSS 2.0 feed<br />
	header(&#039;Content-Type: text/xml&#039;);<br />
	$output = &#039;&lt;&#039; . &#039;?xml version=&quot;1.0&quot;?&#039; . &#039;&gt;&#039; . &quot;\n&quot;;<br />
	$output .= &#039;&lt;rss version=&quot;2.0&quot;&gt;&#039; . &quot;\n&quot;;<br />
	$output .= &#039;&lt;channel&gt;&#039; . &quot;\n&quot;;<br />
	//...<br />
	//process your data and output it into RSS 2.0 format<br />
	//...<br />
	$output .= &#039;&lt;/channel&gt;&#039; . &quot;\n&quot;;<br />
	$output .= &#039;&lt;/rss&gt;&#039;;<br />
}<br />
else<br />
{<br />
	//process your data as normal<br />
}<br />
</code></p>
<p>Then to make sure the page is hit often, place your RSS feed into <a href="http://www.google.com/reader">Google Reader</a> or <a href="http://www.bloglines.com/">Bloglines</a> or some other RSS aggregator. Then your site will be visited often and forced to update. No one else really needs to know about your RSS feeds, unless you want them to be public as well.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=233&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2009/12/14/rss-cron-job/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS3 Validation Debate Reponse</title>
		<link>http://jivebay.com/2009/09/01/css3-validation-debate-reponse/</link>
		<comments>http://jivebay.com/2009/09/01/css3-validation-debate-reponse/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 14:08:10 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=586</guid>
		<description><![CDATA[How to deal with CSS3 Validation Errors from the W3C's CSS Validation service.]]></description>
			<content:encoded><![CDATA[<p>There is a post on <a href="http://www.css3.info/">CSS3.info</a>, <a href="http://www.css3.info/the-big-css3-validation-debate/">The Big CSS3 Validation Debate</a> where I left a comment I figured I&#8217;d make into a post here. It&#8217;s about how adding CSS3 rules to your style sheet result in errors with validation and what we think the W3C should do about it. Anyway, my response is below (edited, because I pressed submit too soon). <img src='http://jivebay.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<hr />
<p>No need to have the W3C mess with their validator just to work with all the possible browser extensions. This would most likely introduce bugs and cause too much of a headache for them.</p>
<p>Here are 2 things you can do to get by the errors</p>
<ol>
<li>Put all your CSS3 rules in a css3.css file and then when you validate everything in your regular .css files should pass and the css3.css should fail.</li>
<li>Or put a /*CSS3*/ comment for each CSS3 rule you have in your style sheet, so when it gives an error you know why. This would work best if you put each css3 rule on a separate line.</li>
</ol>
<img src="http://jivebay.com/?ak_action=api_record_view&id=586&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2009/09/01/css3-validation-debate-reponse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test in IE6 for Real</title>
		<link>http://jivebay.com/2008/09/26/test-in-ie6-for-real/</link>
		<comments>http://jivebay.com/2008/09/26/test-in-ie6-for-real/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 19:41:30 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[virtual machines]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=322</guid>
		<description><![CDATA[I&#8217;ve seen others test out websites in IETester and IE Tab but these tools aren&#8217;t always 100% accurate. For instance you might forget to account for the Eolas bug that will not show up with IE Tab. Also IE6 sometimes does a shift and flicker when it&#8217;s rendering up a page, which IE Tester will [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen others test out websites in <a href="http://www.my-debugbar.com/wiki/IETester/HomePage">IETester</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/1419">IE Tab</a> but these tools aren&#8217;t always 100% accurate. For instance you might forget to account for the Eolas bug that will not show up with IE Tab. Also IE6 sometimes does a shift and flicker when it&#8217;s rendering up a page, which IE Tester will not do, thus the page will look off in IE Tester but not in the real deal.</p>
<p>In my opinion it&#8217;s best to use the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&#038;displaylang=en">free virtual machines that Microsoft has for IE6, IE7 and IE8 beta 2</a>. A few are on XP and another is on Vista, I recommend the XP versions, since they are smaller in filesize and will run much faster. The Virtual Machines expire after a few months, but so far Microsoft has been continuing to make new ones for free.</p>
<p>Then you need to get <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=04D26402-3199-48A3-AFA2-2DC0B40A73B6&#038;displaylang=en">Virtual PC 2007</a> or if you&#8217;re on Windows 2000 you can use <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&#038;displaylang=en">Virtual PC 2004 SP1</a>, both of which are free.</p>
<p>Converting them for use on VMware products is easy, but you do need Virtual PC to create the *.vmc file (this holds the configuration). Once you have the <strong>vmc</strong> file you need to place it in the same folder as the <strong>vhd</strong> file and then you can use <a href="http://www.vmware.com/products/converter/">VMware Converter</a> to convert it into a virtual machine you can use in <a href="http://www.vmware.com/products/player/">VMware Player</a> or <a href="http://www.vmware.com/products/server/">VMware Server</a>, which are all free products.</p>
<p>Of course you could always setup an old Windows 2000 machine, since the last version of Internet Explorer it can run is IE6. And if you are stuck on a Windows 2000 machine, you could always use these virtual machines and install <a href="http://www.google.com/chrome">Chrome</a> or <a href="http://www.apple.com/safari/download/">Safari</a>, since neither work on Windows 2000. However, I wouldn&#8217;t spend too much time configuring the free virtual machines though, since they expire every few months.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=322&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/09/26/test-in-ie6-for-real/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maintenence of Quality</title>
		<link>http://jivebay.com/2008/09/10/maintenence-of-quality/</link>
		<comments>http://jivebay.com/2008/09/10/maintenence-of-quality/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 20:15:25 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=219</guid>
		<description><![CDATA[Remember the last website you launched for a client? The design was clean and looked awesome, that is until they got a hold of the CMS. Even if you clean up any code they dump into the site, the quality can still go downhill overtime. For instance, maybe they like using all caps for titles, [...]]]></description>
			<content:encoded><![CDATA[<p>Remember the last website you launched for a client? The design was clean and looked awesome, that is until they got a hold of the CMS. Even if you clean up any code they dump into the site, the quality can still go downhill overtime. For instance, maybe they like using all caps for titles, huge blocks of bold or italics text or they upload fuzzy pictures. It&#8217;s rare to see a huge site that can maintain its quality over time without having to redesign it again, unless there are some strict limits on what goes in certain fields. We&#8217;ve all seen sites that launch with an impressive design, then over the next 3 years they tack on more and more features without any real thought to how best to place or present that information. Overtime the site becomes jumbled, bloated and its time to redo it again.</p>
<p>Financial situations may pressure you to squeeze in another ad or your web stats prove video is hot, so the powers that be require you to have a video widget on the page. Another department requires you have a link to their content above the fold or someplace prominent with a icon or hideous color. People that use CMSes can&#8217;t see how the information looks as they enter it or if it&#8217;s consistent with the rest of the site, afterall most admins screens are rather plain. Thus, content that wasn&#8217;t originally planned or laid out in the initial design just gets dumped in.</p>
<p><strong>So, what can you do?</strong></p>
<ul>
<li>Filter out CSS and HTML (although sometimes people need the ability to create tables, or put in some YouTube code). You could possibly allow a few tags and then filter out the rest but be sure to remove style attributes.</li>
<li>Setup your CSS to try to override any possible color or font changes (nothing is worse than having a site all in Verdana and then someone dumping in font tags using Lucida Handwriting or big ugly blocks of bold red text).</li>
<li>Make rules or guidelines for entering data into your site.</li>
<li>Suggest to users they should not use all uppercase for titles, let them know that CSS can transform the text for them (that way you if you redesign later you won&#8217;t have some titles in uppercase and others not so).</li>
<li>Suggest alternatives to the bright yellow background colored box they want for video player.</li>
<li>Add a Preview feature that shows them exactly what the data will look like on the live site.</li>
<li>Check the dimensions and filesize of any images uploaded (resize and save them with backend code like PHP if possible or do the alternative with nasty HTML squashing and force them to be a certain size with the height and width attributes).</li>
<li>Be sure they know any images that are uploaded need to look crisp (any really dark, red tinted, or blurry photos can make a good site look bad very quickly).</li>
</ul>
<img src="http://jivebay.com/?ak_action=api_record_view&id=219&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/09/10/maintenence-of-quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Blockquotes</title>
		<link>http://jivebay.com/2008/09/09/css-blockquotes/</link>
		<comments>http://jivebay.com/2008/09/09/css-blockquotes/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 03:12:12 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=276</guid>
		<description><![CDATA[I figured I&#8217;d share two ways I&#8217;ve done blockquotes on this site.
Here is the HTML being used

&#60;blockquote&#62;&#60;p&#62;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet quam. Sed quis justo scelerisque dui iaculis euismod. Nunc sit amet lectus ac orci placerat pulvinar?&#60;/p&#62;&#60;/blockquote&#62;

The first is from the original design the site had.

In this one I [...]]]></description>
			<content:encoded><![CDATA[<p>I figured I&#8217;d share two ways I&#8217;ve done blockquotes on this site.<br />
Here is the HTML being used<br />
<code><br />
&lt;blockquote&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet quam. Sed quis justo scelerisque dui iaculis euismod. Nunc sit amet lectus ac orci placerat pulvinar?&lt;/p&gt;&lt;/blockquote&gt;<br />
</code></p>
<p>The first is from the original design the site had.<br />
<img src="http://jivebay.com/wp-content/uploads/blockquote_old.png" alt="old blockquote" title="blockquote_old" width="482" height="120" class="size-full wp-image-277" /></p>
<p>In this one I just use 2 images for the quotes, but no extra div for the closing quote, because I use the <strong>last-child</strong> pseudo-class.</p>
<p><code><br />
blockquote {<br />
	margin:1.5em;<br />
	padding:5px 40px;<br />
	border-top:1px solid #eee;<br />
	border-bottom:1px solid #eee;<br />
	background:url(images/quotation_marks.gif) no-repeat left 5px;<br />
	color:#717f53;<br />
	min-height:30px;<br />
}<br />
blockquote p:last-child {background:url(images/quotation_marks_close.gif) no-repeat right bottom;}/*css3*/<br />
</code></p>
<hr />
<p>The second is the one I use on the site right now. Instead of using images, I just use the css <strong>content</strong> property and set the value to <strong>open-quote</strong> for the <strong>before</strong> pseudo-class and <strong>close-quote</strong> for the <strong>after</strong> pseudo-class. I also add css rounded corners for some extra styling.<br />
<img src="http://jivebay.com/wp-content/uploads/blockquote_new.png" alt="" title="blockquote_new" width="474" height="186" class="alignnone size-full wp-image-281" /></p>
<p><code><br />
blockquote p {<br />
	padding:10px;<br />
	margin:10px;<br />
}<br />
blockquote:before, blockquote:after {<br />
	display:block;<br />
	cursor:default;<br />
	line-height:1em;<br />
	font-weight:bold;<br />
	font-size:1.6em;<br />
	color:#000;<br />
	font-family:Georgia, &#039;Times New Roman&#039;, serif;<br />
}<br />
blockquote:before {<br />
	content:open-quote;<br />
}<br />
blockquote:after {<br />
	text-align:right;<br />
	content:close-quote;<br />
}<br />
blockquote {<br />
	margin:20px;<br />
	padding:10px;<br />
	border:1px solid #eee;<br />
	line-height:1.4em;<br />
	color:#918e95;<br />
	-moz-border-radius:5px; -webkit-border-radius:5px;/*css3 rounded corners*/<br />
}<br />
</code></p>
<p>This CSS may not work in older-browsers, but if the blockquote is indented with a border or set to another color, it should stand out enough to be ok.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=276&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/09/09/css-blockquotes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Calculating the Moon Phase</title>
		<link>http://jivebay.com/2008/09/07/calculating-the-moon-phase/</link>
		<comments>http://jivebay.com/2008/09/07/calculating-the-moon-phase/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 00:09:02 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=260</guid>
		<description><![CDATA[I was searching for a algorithm to get the phase of the moon, and unfortunately the Moon Phase Class on PHP Classes is inaccurate. With some searching I was able to find 2 sites that have code to pull it off (
Lunar Phase Calculator and Moon Phase Calculation.
I modified the latter (Moon Phase Calculation and [...]]]></description>
			<content:encoded><![CDATA[<p>I was searching for a algorithm to get the phase of the moon, and unfortunately the <a href="http://www.phpclasses.org/browse/package/1201.html">Moon Phase Class</a> on PHP Classes is inaccurate. With some searching I was able to find 2 sites that have code to pull it off (<br />
<a href="http://home.att.net/~srschmitt/script_moon_phase.html">Lunar Phase Calculator</a> and <a href="http://www.voidware.com/moon_phase.htm">Moon Phase Calculation</a>.</p>
<p>I modified the latter (<a href="http://www.voidware.com/moon_phase.htm">Moon Phase Calculation</a> and used the first function listed on that page).<br />
<code><br />
&lt;?php<br />
function moon_phase($year, $month, $day)<br />
{<br />
	/*<br />
	modified from http://www.voidware.com/moon_phase.htm<br />
	*/<br />
	$c = $e = $jd = $b = 0;<br />
	if ($month &lt; 3)<br />
	{<br />
		$year--;<br />
		$month += 12;<br />
	}<br />
	++$month;<br />
	$c = 365.25 * $year;<br />
	$e = 30.6 * $month;<br />
	$jd = $c + $e + $day - 694039.09;	//jd is total days elapsed<br />
	$jd /= 29.5305882;					//divide by the moon cycle<br />
	$b = (int) $jd;						//int(jd) -&gt; b, take integer part of jd<br />
	$jd -= $b;							//subtract integer part to leave fractional part of original jd<br />
	$b = round($jd * 8);				//scale fraction from 0-8 and round<br />
	if ($b &gt;= 8 )<br />
	{<br />
		$b = 0;//0 and 8 are the same so turn 8 into 0<br />
	}<br />
	switch ($b)<br />
	{<br />
		case 0:<br />
			return &#039;New Moon&#039;;<br />
			break;<br />
		case 1:<br />
			return &#039;Waxing Crescent Moon&#039;;<br />
			break;<br />
		case 2:<br />
			return &#039;Quarter Moon&#039;;<br />
			break;<br />
		case 3:<br />
			return &#039;Waxing Gibbous Moon&#039;;<br />
			break;<br />
		case 4:<br />
			return &#039;Full Moon&#039;;<br />
			break;<br />
		case 5:<br />
			return &#039;Waning Gibbous Moon&#039;;<br />
			break;<br />
		case 6:<br />
			return &#039;Last Quarter Moon&#039;;<br />
			break;<br />
		case 7:<br />
			return &#039;Waning Crescent Moon&#039;;<br />
			break;<br />
		default:<br />
			return &#039;Error&#039;;<br />
	}<br />
}<br />
$timestamp = time();<br />
echo moon_phase(date(&#039;Y&#039;, $timestamp), date(&#039;n&#039;, $timestamp), date(&#039;j&#039;, $timestamp));<br />
?&gt;<br />
</code></p>
<p>I haven&#8217;t been able to find out how to calculate the percentage for how lit up (full) the moon is yet though.</p>
<p>I converted the other code in another blog post. <a href="http://jivebay.com/2010/01/04/calculating-the-moon-phase-part-2/">Calculating the Moon Phase Part 2</a></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=260&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/09/07/calculating-the-moon-phase/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Free Weather Forecast</title>
		<link>http://jivebay.com/2008/04/08/free-weather-forecast/</link>
		<comments>http://jivebay.com/2008/04/08/free-weather-forecast/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 16:06:39 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[weather]]></category>

		<guid isPermaLink="false">http://jivebay.com/2008/04/08/free-weather-forecast/</guid>
		<description><![CDATA[I noticed on the National Weather Service&#8217;s website they now allow you to grab the forecast by REST, whereas before they only supported SOAP requests. This makes grabbing the forecast much simpler than it was before.
If you use SOAP there are many methods to grab the data, but if you use REST there are only [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed on the <a href="http://www.weather.gov/xml/">National Weather Service&#8217;s website</a> they now allow you to grab the forecast by REST, whereas before they only supported SOAP requests. This makes grabbing the forecast much simpler than it was before.</p>
<p>If you use SOAP there are many methods to grab the data, but if you use REST there are only 2. With REST you can either use <strong>DWMLgen</strong> which lets you get a little more specific information or <strong>NDFDgenByDay</strong> which is a little simpler and lets you pick either 12 hour or 24 hour increments (so you can get each day broken in half as in day and night or the full day). The response is sent back as XML for either method so you can format the data how you like.</p>
<p>For the example we are doing, we are going to keep it simple and use a single location, <strong>NDFDgenByDay</strong> and a <strong>24 hourly</strong> period. We will also set it up so that we send the longitude and latitude for <strong>Austin, TX</strong>, the current date as the start date and request 7 days worth of data.<br />
<span id="more-223"></span><br />
You&#8217;ll want to get the longitude of the location you want the forecast for. The simplest way is to use <a href="http://maps.google.com/">Google Maps</a> and type in your city and state and search. Then put your cursor slightly below the green arrow, basically as soon as it is not linking to the arrow. Now double click and the map may shift slightly. Now click on the <strong>Link to this page</strong> text and you will get a box and copy whats in the first textfield. You&#8217;ll get a huge URL like the one below.</p>
<pre>

http://maps.google.com/maps?ie=UTF8&#038;oe=utf-8&#038;client=firefox-a&#038;q=Austin,+TX,+USA&#038;ll=30.270928,-97.742615&#038;spn=0.432311,0.6427&#038;z=11
</pre>
<p>What we want is the longitude and latitude. In that long URL you&#8217;ll see <strong>&#038;ll=</strong> and after it will be the longitude and latitude separated by a comma. And in this case it is <strong>30.270928,-97.742615</strong>.</p>
<p>So let&#8217;s make the request and write it to a file. Here is the PHP to do that.<br />
<code><br />
&lt;?php<br />
//custom function to write a file<br />
simple_write_file($filename, $data)<br />
{<br />
	//write file<br />
	$fp = @fopen($filename, &#039;w&#039;); //suppress error<br />
	if ($fp)<br />
	{<br />
		flock($fp, LOCK_EX);//lock file for writing<br />
		fwrite($fp, $data);<br />
		flock($fp, LOCK_UN);//release write lock<br />
		fclose($fp);<br />
		$output = &#039;&#039;;<br />
	}<br />
	else<br />
		$output = &#039;Failed to open file.&#039;;<br />
	return $output;<br />
}<br />
$parameters = array(&#039;lat&#039; =&gt; 30.270928, &#039;lon&#039; =&gt; -97.742615, &#039;startDate&#039; =&gt; gmdate(&#039;Y-m-d&#039;), &#039;numDays&#039; =&gt; 7, &#039;format&#039; =&gt; urlencode(&#039;24 hourly&#039;));<br />
$data = file_get_contents(&#039;http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?&amp;lat=&#039;.$parameters[&#039;lat&#039;].&#039;&amp;lon=&#039;.$parameters[&#039;lon&#039;].&#039;&amp;format=&#039;.$parameters[&#039;format&#039;].&#039;&amp;startDate=&#039;.$parameters[&#039;startDate&#039;].&#039;&amp;numDays=&#039;.$parameters[&#039;numDays&#039;]);<br />
simple_write_file(&#039;forecast.xml&#039;, $data);//NOTE: this will write the error to the file if it encounters one, but this is just for testing purposes<br />
?&gt;<br />
</code></p>
<p>The NWS recommends to make a new request 15 minutes after the hour and to cache the data for an hour. So you&#8217;ll want to write the code to cache it, but for this example we can just check the file and see if it&#8217;s good and then play with that file without having to make requests each time. Now here is some PHP code using <a href="http://us2.php.net/simplexml">SimpleXML</a> to parse through the data in that file.<br />
<code><br />
&lt;?php<br />
$output = &#039;&#039;;<br />
//php5<br />
if (file_exists(&#039;forecast.xml&#039;))<br />
{<br />
	$today = date(&#039;l&#039;);<br />
	$today_index = -1;<br />
	$xmlstr = file_get_contents(&#039;forecast.xml&#039;);<br />
	$xml = simplexml_load_string($xmlstr);<br />
	$xml_weather = $xml-&gt;data-&gt;parameters;//shorthand<br />
	$count = count($xml_weather-&gt;temperature-&gt;value);<br />
	$output .= &#039;&lt;ul id=&quot;weather_forecast&quot;&gt;&#039;;<br />
	for($x = 0; $x &lt; $count; $x++)<br />
	{<br />
		$output .= &#039;&lt;li&gt;&#039;;<br />
		//convert time to timestamp<br />
		$timestamp = strtotime($xml-&gt;data-&gt;{&#039;time-layout&#039;}-&gt;{&#039;start-valid-time&#039;}[$x]);<br />
		$day = date(&#039;l&#039;, $timestamp);<br />
		//get the day of the week<br />
		$output .= &#039;&lt;strong class=&quot;day_of_week&quot;&gt;&#039;;<br />
		if ($today == $day)<br />
		{<br />
			$output .= &#039;Today&#039;;<br />
			$today_index = $x + 1;<br />
		}<br />
		else if ($today_index == $x)<br />
			$output .= &#039;Tomorrow&#039;;<br />
		else<br />
			$output .= $day;<br />
		$output .= &#039;&lt;/strong&gt;&#039;;<br />
		//store it for shorthand multiple use<br />
		$condition = $xml_weather-&gt;weather-&gt;{&#039;weather-conditions&#039;}[$x]-&gt;attributes()-&gt;{&#039;weather-summary&#039;};<br />
		//icon image<br />
		$output .= &#039; &#039;;<br />
		$output .= &#039;&lt;img src=&quot;&#039;;<br />
		$output .= basename($xml_weather-/&gt;{&#039;conditions-icon&#039;}-&gt;{&#039;icon-link&#039;}[$x]);//get the filename, we are going to host the icons on our server<br />
		$output .= &#039;&quot; alt=&quot;&#039; . htmlentities($condition, ENT_QUOTES) . &#039;&quot; /&gt;&#039;;//alt text is the condition<br />
		//conditions<br />
		$output .= &#039; &#039;;<br />
		$output .= &#039;&lt;strong class=&quot;condition&quot;&gt;&#039;;<br />
		$output .= $condition;<br />
		$output .= &#039;&lt;/strong&gt;&#039;;<br />
		//NOTE: 7th day low will usually be null, so dont bother showing the high<br />
		if ($x &lt; 6)<br />
		{<br />
			//high and low<br />
			$output .= &#039; &#039;;<br />
			$output .= &#039;&lt;span class=&quot;temperature&quot;&gt;&#039;;<br />
			$output .= &#039;&lt;span class=&quot;temperature_high&quot;&gt;&#039; . $xml_weather-&gt;temperature[0]-&gt;value[$x] . &#039;&amp;deg;&lt;/span&gt;&#039;;//high<br />
			$output .= &#039; / &#039;;<br />
			$output .= &#039;&lt;span class=&quot;temperature_low&quot;&gt;&#039; . $xml_weather-&gt;temperature[1]-&gt;value[$x] . &#039;&amp;deg;&lt;/span&gt;&#039;;//low<br />
			$output .= &#039;&#039;;<br />
		}<br />
		//NOTE: precipitation is broken into 12hr periods and the 7th day&#039;s evening precipitation will usually be null<br />
		$output .= &#039;&#039;;<br />
	}<br />
	$output .= &#039;&lt;/ul&gt;&#039;;<br />
	$output .= &#039;&lt;p class=&quot;credits&quot;&gt;Weather by &lt;a href=&quot;&#039; . $xml-&gt;head-&gt;source-&gt;credit . &#039;&quot;&gt;NOAA&lt;/a&gt;&lt;/p&gt;&#039;;<br />
}<br />
echo $output;<br />
?&gt;<br />
</code></p>
<p>The benefits to the NWS service are: you can make a request for up to 200 locations in one call, you can get weather from the past or several days ahead and use it on a commercial site.</p>
<p>Now combine this code with <a href="http://jivebay.com/2008/02/01/current-weather-conditions/">code I did before on getting current conditions</a> and you one step closer to building your own portal. <a href="http://jivebay.com/2008/02/01/free-weather-for-your-web-site/">As I mentioned before</a>, you can’t claim to have copyright on the data, but it is <a href="http://www.weather.gov/disclaimer.php">public domain information</a>.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=223&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/04/08/free-weather-forecast/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>PHP Forms Class with 4 hour Video Tutorial</title>
		<link>http://jivebay.com/2008/02/04/php-forms-class-with-4-hour-video-tutorial/</link>
		<comments>http://jivebay.com/2008/02/04/php-forms-class-with-4-hour-video-tutorial/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 01:26:19 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jivebay.com/2008/02/04/php-forms-class-with-4-hour-video-tutorial/</guid>
		<description><![CDATA[Manuel Lemos has made a 4 hour video tutorial for his popular PHP Forms Generation and Validation class. Thankfully Google Video has a download link so you can watch it when you want. PHP Classes has quite a few other nice classes on their site, however the site is kind of confusing to use. Basically [...]]]></description>
			<content:encoded><![CDATA[<p>Manuel Lemos has made a <a href="http://video.google.com/videoplay?docid=3038413558532929368&#038;hl=en">4 hour video tutorial</a> for his popular <a href="http://www.phpclasses.org/browse/package/1.html">PHP Forms Generation and Validation class</a>. Thankfully Google Video has a download link so you can watch it when you want. <a href="http://www.phpclasses.org/">PHP Classes</a> has quite a few other nice classes on their site, however the site is kind of confusing to use. Basically you have to register (which is free), then login and then pick what server to use (they balance their servers by doing this) then you can get whatever files you want. Anyone willing to make that long a tutorial is pretty cool in my book. <img src='http://jivebay.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I haven&#8217;t used this yet, but it looks interesting.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=202&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/02/04/php-forms-class-with-4-hour-video-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Current Weather Conditions</title>
		<link>http://jivebay.com/2008/02/01/current-weather-conditions/</link>
		<comments>http://jivebay.com/2008/02/01/current-weather-conditions/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 16:35:52 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[weather]]></category>

		<guid isPermaLink="false">http://jivebay.com/2008/02/01/current-weather-conditions/</guid>
		<description><![CDATA[The National Weather Service provides Current Weather Conditions XML files for many cities in the US.
Here is some code for PHP5 (it uses SimpleXML) on doing this (assuming you&#8217;ve already grabbed the XML file from their site and have a way to cache it). It even has some code calculating the sunrise, sunset and civil [...]]]></description>
			<content:encoded><![CDATA[<p>The National Weather Service provides <a href="http://www.weather.gov/data/current_obs/">Current Weather Conditions XML files</a> for many cities in the US.</p>
<p>Here is some code for PHP5 (it uses SimpleXML) on doing this (assuming you&#8217;ve already grabbed the XML file from their site and have a way to cache it). It even has some code calculating the sunrise, sunset and civil twilight which PHP5 can do with <a href="http://www.php.net/manual/en/function.date-sun-info.php">date_sun_info()</a> and since the XML file gives the date, latitude and longitude, you can calculate it dynamically.<br />
<code><br />
//PHP5<br />
if (file_exists(&#039;KADS.xml&#039;))<br />
{<br />
$xmlstr = file_get_contents(&#039;KADS.xml&#039;);<br />
$xml = simplexml_load_string($xmlstr);<br />
$datetime = strtotime($xml-&gt;observation_time_rfc822);<br />
$latitude = (float)$xml-&gt;latitude;<br />
$longitude = (float)$xml-&gt;longitude;<br />
$sun_info = date_sun_info(date(&#039;Y-n-j&#039;, $datetime), $latitude, $longitude);//calculate sunrise,sunset,...<br />
echo &#039;&lt;ul id=&quot;current_conditions&quot;&gt;&#039;;<br />
echo &#039;&lt;li&gt;&#039; . date(&#039;l, F j, Y&#039;, $datetime) . &#039;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li class=&quot;weather_loc&quot;&gt;&#039; . $xml-&gt;location . &#039;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;!--&#039; . $xml-&gt;observation_time . &#039;--&gt;&#039;;<br />
echo &#039;&lt;li&gt;&lt;img src=&quot;&#039; . $xml-&gt;icon_url_base . $xml-&gt;icon_url_name . &#039;&quot; alt=&quot;&#039; . $xml-&gt;weather . &#039;&quot; /&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li class=&quot;weather_temp&quot;&gt;&lt;strong&gt;&#039; . $xml-&gt;temp_f . &#039;&amp;deg;&#039; . &#039;&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li class=&quot;weather_sum&quot;&gt;&lt;strong&gt;&#039; . $xml-&gt;weather . &#039;&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li&gt;Wind: &lt;strong&gt;&#039; . $xml-&gt;wind_dir . &#039; &#039; . round($xml-&gt;wind_mph) . &#039; mph&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li&gt;Humidity: &lt;strong&gt;&#039; . $xml-&gt;relative_humidity . &#039;%&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
if ($xml-&gt;heat_index_f != &#039;NA&#039;)<br />
	echo &#039;&lt;li&gt;Heat Index: &lt;strong&gt;&#039; . $xml-&gt;heat_index_f . &#039;&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
if ($xml-&gt;windchill_f != &#039;NA&#039;)<br />
	echo &#039;&lt;li&gt;Windchill: &lt;strong&gt;&#039; . $xml-&gt;windchill_f . &#039;&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li&gt;Barometer: &lt;strong&gt;&#039; . $xml-&gt;pressure_in . &#039;&amp;quot;&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li&gt;Visibility: &lt;strong&gt;&#039; . $xml-&gt;visibility_mi . &#039; mi&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li&gt;Dewpoint: &lt;strong&gt;&#039; . $xml-&gt;dewpoint_f . &#039;&amp;deg;&lt;/strong&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li class=&quot;weather_credit&quot;&gt;weather by &lt;a href=&quot;&#039; . $xml-&gt;credit_URL . &#039;&quot; title=&quot;&#039; . $xml-&gt;credit . &#039;&quot;&gt;NOAA&lt;/a&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;/ul&gt;&#039;;<br />
echo &#039;&lt;ul id=&quot;sunrise_sunset&quot;&gt;&#039;;<br />
echo &#039;&lt;li&gt;Sunrise: &lt;strong&gt;&#039; . date(&#039;g:i a&#039;, $sun_info[&#039;sunrise&#039;]) . &#039;&lt;/strong&gt; &lt;span class=&quot;civil_twilight&quot;&gt;Civil Twilight: &lt;strong&gt;&#039; . date(&#039;g:i a&#039;, $sun_info[&#039;civil_twilight_begin&#039;]) . &#039;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;li&gt;Sunrise: &lt;strong&gt;&#039; . date(&#039;g:i a&#039;, $sun_info[&#039;sunset&#039;]) . &#039;&lt;/strong&gt; &lt;span class=&quot;civil_twilight&quot;&gt;Civil Twilight: &lt;strong&gt;&#039; . date(&#039;g:i a&#039;, $sun_info[&#039;civil_twilight_end&#039;]) . &#039;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&#039;;<br />
echo &#039;&lt;/ul&gt;&#039;;<br />
}<br />
</code></p>
<p>You will probably want to cache that output once you have it formatted how you like.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=152&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/02/01/current-weather-conditions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
