<?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>i am jack's design &#187; Programming</title>
	<atom:link href="http://www.iamjacksdesign.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iamjacksdesign.com/blog</link>
	<description>thoughts on freelancing and web development</description>
	<lastBuildDate>Fri, 16 Jul 2010 17:28:38 +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>Redirect HTTP To HTTPS Using ASP</title>
		<link>http://www.iamjacksdesign.com/blog/redirect-http-to-https-using-asp/</link>
		<comments>http://www.iamjacksdesign.com/blog/redirect-http-to-https-using-asp/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 18:11:16 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/?p=275</guid>
		<description><![CDATA[It&#8217;s been a really long time since I had a post with a coding solution here. So today I thought I&#8217;d throw up something I needed earlier this summer for anyone else looking for similar code.
On an older site, still running Classic ASP, I needed to redirect anyone visiting a page with standard HTTP to [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a really long time since I had a post with a coding solution here. So today I thought I&#8217;d throw up something I needed earlier this summer for anyone else looking for similar code.</p>
<p>On an older site, still running Classic ASP, I needed to redirect anyone visiting a page with standard HTTP to the same page using HTTPS. Here&#8217;s the solution which I included at the very top of the page before any other code is called:</p>
<pre name="code" class="csharp:nogutter">&lt;%
	if Request.ServerVariables("HTTPS") = "off" then
		srvname = Request.ServerVariables("SERVER_NAME")
		scrname = Request.ServerVariables("SCRIPT_NAME")
		response.redirect("https://" &#038; srvname &#038; scrname)
	end if
%>
</pre>
<p>Basically, whenever someone visits the page it checks to see if they came from http://www.example.com/page and then redirects them straight to http<b>s</b>://www.example.com/page to ensure they&#8217;re visiting the page on a secure connection.</p>
<p>There are probably much better ways to do this but since this is what worked for me I thought I&#8217;d share.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=275&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/redirect-http-to-https-using-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Quick Web Sites With Mashups</title>
		<link>http://www.iamjacksdesign.com/blog/building-quick-web-sites-with-mashups/</link>
		<comments>http://www.iamjacksdesign.com/blog/building-quick-web-sites-with-mashups/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 19:20:12 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Side Projects]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/?p=234</guid>
		<description><![CDATA[The idea of a mashup, or a site built with pieces of content from other sites, is definitely not an unfamiliar idea to me or most people. I have a large network of such sites based around sports and I&#8217;m starting to branch out into other topics lately as well. My latest is a site [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>The idea of a mashup, or a site built with pieces of content from other sites, is definitely not an unfamiliar idea to me or most people. I have a large network of such sites based around sports and I&#8217;m starting to branch out into other topics lately as well. My latest is a site about my favorite record label called <a href="http://www.subpopbands.com">Sub Pop Bands</a>.</p>
<p>I&#8217;m a big fan of the mashup idea for two reasons: speed and simplicity.</p>
<h3 class="bigger">Mashups Are Quick</h3>
<p>I have a custom built content management system for my mashup sites but even if you don&#8217;t have that kind of programming knowledge making your own mashup site is relatively simple. There are so many widgets and free scripts to let you bring in fresh content that putting together your own mashup site should take no time at all.</p>
<p>Aside from the content from outside sources, my mashup sites also contain hand-written content that I have made unique for that site. Whether you write this content yourself or hire someone to write it for you is your decision to make. When I have the content in hand I simply copy and paste it into my CMS and the site is updated.</p>
<h3 class="bigger">Mashups Are Simple</h3>
<p>A mashup site isn&#8217;t a complicated e-commerce store, a frequently maintained blog or any other type of time consuming website. it&#8217;s really a simple content site that is augmented with automatically updating features to keep the site fresh with new content. How can it get much simpler than that?</p>
<p>It is that simplicity that makes it possible to produce, quite literally, dozens of these sites with little to no effort. For under $50 I can have all of the necessary content written for me and away I go. No fuss or hassle after I load up the site using the content management system.</p>
<h3 class="bigger">The End Goal</h3>
<p>The whole point of the mashup site, as with most things online these days, is to make some money. You can use something like <a href="http://www.iamjacksdesign.com/blog/link/phpbay-pro">phpBay Pro</a> to add eBay listings to your sites like I do. I also include AdSense and sell private advertising on the sites when the time for that is right. It takes a bit of time but not a lot of effort to turn these sites into profit machines.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=234&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/building-quick-web-sites-with-mashups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript And The Invasion Of Your Privacy</title>
		<link>http://www.iamjacksdesign.com/blog/javascript-and-the-invasion-of-your-privacy/</link>
		<comments>http://www.iamjacksdesign.com/blog/javascript-and-the-invasion-of-your-privacy/#comments</comments>
		<pubDate>Fri, 30 May 2008 17:38:00 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/?p=230</guid>
		<description><![CDATA[When news came out the other day about Google&#8217;s move to host some of the more popular JavaScript libraries on their servers I was going to write a post about the privacy implications. As I sat down this morning to write that very post I came across another JavaScript related news story that trumped the [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>When news came out the other day about Google&#8217;s move to host some of the more popular JavaScript libraries on their servers I was going to write a post about the privacy implications. As I sat down this morning to write that very post I came across another JavaScript related news story that trumped the one from Google.</p>
<p><a href="http://azarask.in/blog/post/socialhistoryjs/">SocialHistory.js</a> is a brand new piece of JavaScript code that, while clever, is also a little bit disconcerting at the same time. This script allows a site to determine what social networking (or regular sites) a visitor has previously visited. The creator of the script uses the example of implementing this to determine what social bookmarking links to provide on a page.</p>
<p>My first thought was the amount of market research a person could collect with this. What&#8217;s stopping me from taking the script, slightly modifying it so that it actually stores the data is collects and then using that data to determine if making pushes to promote my site on certain social networks would be worth my time? The answer is probably nothing.</p>
<p>But is that a good idea? The data is probably relatively harmless. For instance, the script can tell that I personally use sites like Facebook and del.icio.us but that&#8217;s true for, quite literally, hundreds of thousands of people. Maybe the data you could gather from <a href="http://azarask.in/blog/post/socialhistoryjs/">SocialHistory.js</a> to use for research means wouldn&#8217;t prove to be very valuable in the long term but I&#8217;m just not sure it&#8217;s any of my business to see that information in the first place.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=230&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/javascript-and-the-invasion-of-your-privacy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Thoughts On Ecommerce Solutions</title>
		<link>http://www.iamjacksdesign.com/blog/my-thoughts-on-ecommerce-solutions/</link>
		<comments>http://www.iamjacksdesign.com/blog/my-thoughts-on-ecommerce-solutions/#comments</comments>
		<pubDate>Tue, 13 May 2008 13:40:05 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/?p=224</guid>
		<description><![CDATA[When I first started getting involved in freelance web development the requests for building online stores were few and far between. In recent years this has totally changed, as people want more and more to begin selling their products and services online. This trend has increased just as quickly as people’s concerns and interests in [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>When I first started getting involved in freelance web development the requests for building online stores were few and far between. In recent years this has totally changed, as people want more and more to begin selling their products and services online. This trend has increased just as quickly as people’s concerns and interests in <a href="http://www.datadial.net/Services/Online-Marketing/what-is-online-marketing/search-engine-optimisation/">Search Engine Optimisation</a>.</p>
<p>I’ve used my fair share of <a href="http://www.datadial.net/Services/E-Commerce/">Ecommerce Software</a> in this time and, really, they’re all about the same. They come in two flavors: hosted and self-hosted. My preference is to always go with the hosted solution because while the costs are usually higher the headaches are few and far between. A lot of the hosted solutions also have really excellent hooks that let you tie into your own CMS or scripts.</p>
<p>The one big knock on hosted shopping cart packages is that you lose almost all control over the look and feel of the interface. This is unfortunate because the best <a href="http://www.datadial.net/">Web Design</a> firms out there didn’t exactly build most of these carts. This is where the hooks they provide or so important. With the right hooks and programming you can do as much as you can on your side of the equation to offset what’s lacking on the hosted side.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=224&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/my-thoughts-on-ecommerce-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube Releases Useful API Additions</title>
		<link>http://www.iamjacksdesign.com/blog/youtube-releases-useful-api-additions/</link>
		<comments>http://www.iamjacksdesign.com/blog/youtube-releases-useful-api-additions/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 16:59:07 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/youtube-releases-useful-api-additions/</guid>
		<description><![CDATA[It took a long, long time but YouTube finally announced additions to their API that actually make it useful. With the release of the features listed below we&#8217;re about to see the floodgate open on third-party YouTube applications.


Upload videos and video responses to YouTube
Add/Edit user and video metadata (titles, descriptions, ratings, comments, favorites, contacts, etc)
Fetch [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>It took a long, long time but YouTube finally <a href="http://www.youtube.com/blog?entry=yFlR6EEySg8">announced additions to their API</a> that actually make it useful. With the release of the features listed below we&#8217;re about to see the floodgate open on third-party YouTube applications.</p>
<p><a href="http://www.youtube.com"><img class="right border" src='http://www.iamjacksdesign.com/blog/wp-content/uploads/2008/03/youtube.jpg' alt='YouTube' /></a>
<ul>
<li>Upload videos and video responses to YouTube</li>
<li>Add/Edit user and video metadata (titles, descriptions, ratings, comments, favorites, contacts, etc)</li>
<li>Fetch localized standard feeds (most viewed, top rated, etc.) for 18 international locales</li>
<li>Perform custom queries optimized for 18 international locales</li>
<li>Customize player UI and control video playback (pause, play, stop, etc.) through software</li>
</ul>
<p>I hope someone combines this with the new iPhone SDK and makes a YouTube application for my iPod Touch that&#8217;s actually worth a damn.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=205&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/youtube-releases-useful-api-additions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Interview With Erik Karey On phpBayAds</title>
		<link>http://www.iamjacksdesign.com/blog/an-interview-with-erik-karey-on-phpbayads/</link>
		<comments>http://www.iamjacksdesign.com/blog/an-interview-with-erik-karey-on-phpbayads/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 15:59:02 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[Interviews]]></category>
		<category><![CDATA[Money]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/an-interview-with-erik-karey-on-phpbayads/</guid>
		<description><![CDATA[Yesterday, Erik Karey released phpBayAds, his eBay ads script, for free to the public. Think of phpBayAds as a self-hosted version of the old AuctionAds program. Erik was kind enough to answer some questions I had about his new release. 
With the wild popularity of BANS and phpBay Pro these days it seems like you&#8217;ve [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>Yesterday, <a href="http://www.erikkarey.com/">Erik Karey</a> released <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a>, his eBay ads script, for free to the public. Think of <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> as a self-hosted version of the old AuctionAds program. Erik was kind enough to answer some questions I had about his new release. <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html"><img class="center border"  src='http://www.iamjacksdesign.com/blog/wp-content/uploads/2008/02/phpbayadslogo.jpg' alt='phpBayAds' /></a></p>
<p><b>With the wild popularity of BANS and phpBay Pro these days it seems like you&#8217;ve hit a gap in the marketplace for eBay affiliates. Can you take a minute to describe what phpBayAds does for those that haven&#8217;t heard yet and who is most likely to benefit from using it?</b></p>
<blockquote><p>I&#8217;ve noticed the increase in the popularity of the eBay affiliate program for awhile now and I&#8217;ve even started using phpBayPro on a few websites of mine and found great success with it.  I also noticed a lot of press on AuctionAds (now ShoppingAds) and it&#8217;s shortcomings.</p>
<p>All of these things got me thinking about what type of products I could develop to capitalize on the publicity surrounding the eBay affiliate program which eventually led me to creating <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a>.  </p>
<p><a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> lets you create adsense-styled ads that feature images and links to eBay auction products using your own eBay Affiliate ID.   So when a user clicks on the ad and either makes a purchase or signs up for eBay you get the commissions.  </p>
<p>Although results will vary from site to site, I think <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> can benefit every webmaster who tries it as it adds an additional source of income to your websites.  <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> are fully customizable from the color of the links to the color of the border to the size of the ads and can be made to blend well with any and all websites.</p></blockquote>
<p><b>What was some of your reasoning behind releasing phpBayAds for free?</b></p>
<blockquote><p>When I initially set out to release <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> I planned to sell it for somewhere around $20.  However when I got to thinking about it I realized that at least at the start of my development that releasing it for free and getting the largest amount of users using the script is to my benefit.  </p>
<p>I truly want this script to succeed and to do that I need people to use it and I need people to provide me with feedback.  I&#8217;m hoping that as the script gets more exposure and as I add features that I may release a low cost Pro version which would include more features and functionality.</p></blockquote>
<p><b>What are some of the benefits/disadvantages to you as a developer in making people run the script on their own server?</b></p>
<blockquote><p>I think the main advantage of being able to run this script on your own server is that you are in full control.  Your ads will always be running as long as your own web host is running.  You don&#8217;t have to rely on any 3rd party website.</p>
<p>In the future as <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> grows in popularity I would like to offer a hosted version for a low monthly cost which would let those less technical users also use the script.</p></blockquote>
<p><b>What&#8217;s in store for future releases?</b></p>
<blockquote><p>I have a number of features that I&#8217;d love to add as long as <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> grows in popularity.  </p>
<p>One major feature that I plan to add in the near future is reporting.  I want to be able to track all of the clicks going through the ads, show what keywords are performing, what ad sizes are working best and present it all in one useful control panel.  </p>
<p>As I mentioned above I&#8217;d also like to offer a hosted version of the script and perhaps additional ad sizes.  </p>
<p>Lastly I&#8217;d like to make the ads more configurable by allowing you to set whether or not the ads should have images, price range of the items, geotargetting and more!  </p>
<p>The future is bright for <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> as long as people find it useful.</p></blockquote>
<p class="alert">I want to thank Erik for taking the time to answer my questions. You can learn more about <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">phpBayAds</a> and download it for free over at his <a href="http://www.erikkarey.com/phpbayads-is-here-and-its-free.html">blog</a>.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=197&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/an-interview-with-erik-karey-on-phpbayads/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Get Your Site On The iPhone With iUI</title>
		<link>http://www.iamjacksdesign.com/blog/get-your-site-on-the-iphone-with-iui/</link>
		<comments>http://www.iamjacksdesign.com/blog/get-your-site-on-the-iphone-with-iui/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 15:17:04 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/get-your-site-on-the-iphone-with-iui/</guid>
		<description><![CDATA[On Monday, Google announced that some of their applications had been upgraded on the iPhone and iPod Touch. I finally got a chance to check out the new version of Gmail this morning on my iPod Touch and it&#8217;s probably one of the best iPhone specific sites I&#8217;ve seen yet. The only thing that closely [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p><img class="right border" src='http://www.iamjacksdesign.com/blog/wp-content/uploads/2008/01/gmail_iphone.jpg' alt='Gmail On The iPhone' />On Monday, Google announced that some of their <a href="http://googlemobile.blogspot.com/2008/01/google-on-iphone-macworld-makeover.html">applications had been upgraded on the iPhone and iPod Touch</a>. I finally got a chance to check out the <a href="http://gmailblog.blogspot.com/2008/01/new-gmail-for-iphone.html">new version of Gmail</a> this morning on my iPod Touch and it&#8217;s probably one of the best iPhone specific sites I&#8217;ve seen yet. The only thing that closely rivals it is <a href="http://iphone.facebook.com">Facebook</a> on the iPhone.</p>
<p><a href="http://www.joehewitt.com">Joe Hewitt</a> is the man responsible for Facebook on the iPhone. Fortunately for the rest of us he <a href="http://www.joehewitt.com/blog/introducing_iui.php">released the JavaScript and CSS</a> he used in developing the site. The package is called <a href="http://code.google.com/p/iui/">iUI</a> and is available under the New BSD License. You can get a feel for just what <a href="http://code.google.com/p/iui/">iUI</a> can do by checking out some <a href="http://code.google.com/p/iui/wiki/Introduction">examples on its Google Code site</a>.</p>
<p>Creating a mobile version of a site is probably one of those projects that most of us get all excited about and then immediately place on the backburner. How much longer can we put a mobile version off? The market share of the iPhone is exploding and tools like <a href="http://code.google.com/p/iui/">iUI</a> can make it easier to get a mobile site launched than ever before.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=141&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/get-your-site-on-the-iphone-with-iui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Parse Yahoo Weather Data With PHP</title>
		<link>http://www.iamjacksdesign.com/blog/parse-yahoo-weather-data-with-php/</link>
		<comments>http://www.iamjacksdesign.com/blog/parse-yahoo-weather-data-with-php/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 12:54:32 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/parse-yahoo-weather-data-with-php/</guid>
		<description><![CDATA[The Yahoo! Developer Network offers all sorts of excellent APIs, RSS feeds and other resources for web developers. I&#8217;ve written in the past about using their stock quote CSV files to get stock updates and today I&#8217;ll show you a really short piece of code to gather weather data directly from Yahoo! Weather.
The code below [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://developer.yahoo.com/">Yahoo! Developer Network</a> offers all sorts of excellent APIs, RSS feeds and other resources for web developers. I&#8217;ve written in the past about using their <a href="http://www.iamjacksdesign.com/blog/stock-quotes-from-yahoo-in-rss-or-csv/">stock quote CSV files</a> to get stock updates and today I&#8217;ll show you a really short piece of code to gather weather data directly from <a href="http://developer.yahoo.com/weather/index.html">Yahoo! Weather</a>.</p>
<p>The code below is pretty simple but it relies on <a href="http://magpierss.sourceforge.net/">Magpie</a> to handle the RSS stuff. I&#8217;ve <a href="http://www.iamjacksdesign.com/blog/a-decent-rss-parser-for-php/">written about Magpie before</a> if you&#8217;re interested in learning more. The trick with these weather feeds from Yahoo! is stripping out the current weather and the forecast from between the bizarre HTML markup they&#8217;ve put around it all. This chunk of code should take care of that for you.</p>
<pre name="code" class="php:nogutter">&lt;?php
	include("rss_fetch.inc");

	$zipcode = "44101";
	$feed = fetch_rss("http://xml.weather.yahoo.com/forecastrss?p=".$zipcode);

	if ($feed and !$feed->ERROR)
	{
		$items = array_slice($feed->items, 0);
		foreach ($items as $item)
		{
			$arr_weather = explode('&lt;br />', str_replace('&lt;BR />', '&lt;br />', str_replace('&lt;p />', '&lt;br />', $item['description'])));
			$arr_forecast = explode('-', $arr_weather[5]);

			$current_weather = trim($arr_weather[2]);
			$forecast_weather = trim($arr_forecast[1]);
		}
	}
?>
</pre>
<p>When this is done you&#8217;re left with a variable named <b>$current_weather</b> that contains the weather as it exists at that moment and another variable named <b>$forecast_weather</b> with the current day&#8217;s weather forecast.</p>
<p><img class="right border" src='http://www.iamjacksdesign.com/blog/wp-content/uploads/2008/01/forescore_weather.gif' alt='Fore Score Golf Stats - Course Weather' />I&#8217;ve used this chunk of code severals times on intranets I&#8217;ve built. A variation on this code that includes weather icons helps power some features at <a href="http://www.forescoregolfstats.com">Fore Score Golf Stats</a> as well. A big use there is to show the current weather at any courses a user has played at (seen on the right).</p>
<p>If you want to read some more about Yahoo&#8217;s weather RSS feeds then check out the <a href="http://developer.yahoo.com/weather/index.html">weather section</a> of their Developer Network.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=131&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/parse-yahoo-weather-data-with-php/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Four Sites For Aspiring Facebook App Developers</title>
		<link>http://www.iamjacksdesign.com/blog/four-sites-for-aspiring-facebook-app-developers/</link>
		<comments>http://www.iamjacksdesign.com/blog/four-sites-for-aspiring-facebook-app-developers/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 11:37:46 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/four-sites-for-aspiring-facebook-app-developers/</guid>
		<description><![CDATA[I&#8217;ve been thinking a lot lately about the benefits of building Facebook Applications. I find the whole thing pretty interesting and I might be building a simple app to tie into Fore Score Golf Stats this year. Here are a few sites for those of you thinking about developing your own Facebook Apps to check [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking a lot lately about the benefits of building Facebook Applications. I find the whole thing pretty interesting and I might be building a simple app to tie into <a href="http://www.forescoregolfstats.com">Fore Score Golf Stats</a> this year. Here are a few sites for those of you thinking about developing your own Facebook Apps to check out :</p>
<h3><a href="http://developers.facebook.com/">The Official Facebook Platform Site</a></h3>
<p><a href="http://developers.facebook.com/"><img class="right" src='http://www.iamjacksdesign.com/blog/wp-content/uploads/2008/01/facebook.jpg' alt='Facebook' /></a>The most obvious place to start developing Facebook Apps is the official website at <a href="http://developers.facebook.com/">http://developers.facebook.com</a>. There you’ll find the essentials for building an application. You’ll find <a href="http://developers.facebook.com/documentation.php">documentation</a> with details of how the Facebook Platform works. There’s a <a href="http://developers.facebook.com/resources.php">resources section</a>  with code samples, client libraries and more. There’s also a <a href="http://developers.facebook.com/tools.php">Tools section</a> that allows you to prototype your Facebook application in real time with user friendly test consoles. You can keep up with the <a href="http://developers.facebook.com/news.php">latest news</a> about the Facebook Platform as well.</p>
<h3><a href="http://www.bestfacebookapplications.com">Best Facebook Applications</a> &#038; <a href="http://www.facereviews.com">FaceReviews</a></h3>
<p><a href="http://www.bestfacebookapplications.com">Best Facebook Applications</a> posts profiles and reviews of some of the newest Facebook applications. <a href="http://www.facereviews.com">FaceReviews</a> also offers application spotlights and includes an <a href="http://facereviews.com/application-development/">Application Development</a> program for those of you looking for help developing or marketing your Facebook Application ideas. You can use these two sites not only as inspiration for an application idea but to also keep an eye on competition your future app might have.</p>
<h3><a href="http://www.softwaredeveloper.com/features/develop-facebook-app-072607/">How to Develop a Hit Facebook App: 29 Essential Tools and Tutorials</a></h3>
<p>This awesome list at <a href="http://www.softwaredeveloper.com/">SoftwareDeveloper.com</a> contains <a href="http://www.softwaredeveloper.com/features/develop-facebook-app-072607/">29 links to important articles and lessons</a> for anyone looking to get into developing Facebook Applications. There are links for people getting ready to build an app, developers who are in the thick of things and creators ready to market and grow their apps. There are links for everyone in each stage of development. It&#8217;s definitely worth a bookmark.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=103&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/four-sites-for-aspiring-facebook-app-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP Function For Inline Comparisons</title>
		<link>http://www.iamjacksdesign.com/blog/simple-php-function-for-inline-comparisons/</link>
		<comments>http://www.iamjacksdesign.com/blog/simple-php-function-for-inline-comparisons/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 22:27:05 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/simple-php-function-for-inline-comparisons/</guid>
		<description><![CDATA[This will probably seem trivial and obvious to most PHP users out there but some of you might find this simple function useful. There are a lot of times when you&#8217;ll want to do a quick comparison and then, for example, give an HTML element a specific class based on what you found. The following [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>This will probably seem trivial and obvious to most PHP users out there but some of you might find this simple function useful. There are a lot of times when you&#8217;ll want to do a quick comparison and then, for example, give an HTML element a specific class based on what you found. The following is a short and sweet function I include in all of my projects to make this easy to do:</p>
<pre name="code" class="php:nogutter">&lt;?php
	function check_equal($val1, $val2, $response)
	{
		if ($val1 == $val2)
		{
			return $response;
		}
	}
?>
</pre>
<p>Here&#8217;s an example of this function in action:</p>
<pre name="code" class="php:nogutter">&lt;?php
	echo '&lt;div'.check_equal($user, 1, ' class="author"').'>';
?>
</pre>
<p>In the example above, whenever the value of $user is equal to 1 then the div will be written out with the class of &#8220;author&#8221; attached to it. Now I can make some changes to my CSS to style that div differently based on the value of the PHP variable $user.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=121&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/simple-php-function-for-inline-comparisons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
