<?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>Kastang &#187; iPhone</title>
	<atom:link href="http://kastang.com/blog/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://kastang.com</link>
	<description>Ramblings of a Geek</description>
	<lastBuildDate>Sat, 21 Aug 2010 16:17:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Push Daily Weather to your iPhone using Prowl</title>
		<link>http://kastang.com/blog/2010/08/push-daily-weather-to-your-iphone-using-prowl/</link>
		<comments>http://kastang.com/blog/2010/08/push-daily-weather-to-your-iphone-using-prowl/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 13:18:13 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Prowl]]></category>
		<category><![CDATA[Weather]]></category>

		<guid isPermaLink="false">http://kastang.com/?p=556</guid>
		<description><![CDATA[Below is a PHP script that will pull your daily local weather forecast from Weather Bug and push it to your iPhone using Prowl. One requirement is you have the Prowl iPhone app on your iPhone or iTouch. Prowl is $2.99 in the App Store. This script also requires PHP to be installed on your [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a PHP script that will pull your daily local weather forecast from Weather Bug and push it to your iPhone using Prowl. One requirement is you have the Prowl iPhone app on your iPhone or iTouch. Prowl is $2.99 in the App Store. This script also requires PHP to be installed on your server/desktop machine. I have tested this script with a handful of random Zip Codes around the US. If I happen to come up with any special conditions, I will update the script below.  </p>
<p>Before running this script, make sure you change the XXXXX's in <code>$xml</code> to your local zip code and change YOUR_API_KEY_HERE in <code>$prowl</code> to your Prowl API code. You will also need to change <code>includes('API/ProwlPHP')</code> to the location of <a href="http://github.com/Fenric/ProwlPHP">ProwlPHP</a> on your server.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * This script pulls a local XML weather forcast from
 * Weatherbug. Pushes the current days weather to a
 * device running prowl.
 *
 * This script requires ProwlPHP, and a valid Prowl API code.
 *
 * @author Kastang (josh at kastang.com)
 */</span>
    <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'API/ProwlPHP.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Change the XXXXX's to your local zip code.</span>
    <span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://feeds.weatherbug.com/rss.aspx?zipcode=XXXXX&amp;feed=fcst&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Parse the description from Weatherbug.</span>
    prowl<span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">ltrim</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">22</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Push the weather to Prowl.</span>
    <span style="color: #000000; font-weight: bold;">function</span> prowl<span style="color: #009900;">&#40;</span><span style="color: #000088;">$weather</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$prowl</span> <span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Prowl<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'YOUR_API_KEY_HERE'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$prowl</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">push</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                        <span style="color: #0000ff;">'application'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Weather'</span><span style="color: #339933;">,</span>
                        <span style="color: #0000ff;">'event'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Today'</span><span style="color: #339933;">,</span>
                        <span style="color: #0000ff;">'description'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$weather</span><span style="color: #339933;">,</span>
                        <span style="color: #0000ff;">'priority'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
                    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>I have this setup daily to run at 8am using cron. Below is an example you should add to crontab if you want to do the same thing:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">0</span> <span style="color: #000000;">8</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>weather.php</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://kastang.com/blog/2010/08/push-daily-weather-to-your-iphone-using-prowl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Dev Tip &#8211; Determining Connection Type</title>
		<link>http://kastang.com/blog/2009/08/iphone-dev-tip-determining-connection-type/</link>
		<comments>http://kastang.com/blog/2009/08/iphone-dev-tip-determining-connection-type/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 03:42:14 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone Dev]]></category>

		<guid isPermaLink="false">http://kastang.com/?p=188</guid>
		<description><![CDATA[I am working on an iPhone application that requires the ability to recognize which type of internet connection is currently being used (Wifi, 3G, Edge, etc).  I found a simple way to check by using Apples Reachability sample code. There seems to be a shortage of information about this online, I hope this can help someone. [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on an iPhone application that requires the ability to recognize which type of internet connection is currently being used (Wifi, 3G, Edge, etc).  I found a simple way to check by using Apples <a href="http://developer.apple.com/iphone/library/samplecode/Reachability/">Reachability </a>sample code. There seems to be a shortage of information about this online, I hope this can help someone.</p>
<p>First copy Reachability.m/.h into your project and include #include "Reachability.h" into your class.</p>
<pre>	Reachability *reach = [[Reachability alloc]init];
	if (reach.internetConnectionStatus == NotReachable) {
		NSLog(@"No Connection Found");
	} else if (reach.internetConnectionStatus == ReachableViaCarrierDataNetwork) {
		NSLog(@"3G or Edge");
	} else if (reach.internetConnectionStatus == ReachableViaWiFiNetwork) {
		NSLog(@"Wifi Connection");
	}
	[reach release];</pre>
<p>This code may not be the best way to accomplish this, but it appears to be the most simple approach.</p>
]]></content:encoded>
			<wfw:commentRss>http://kastang.com/blog/2009/08/iphone-dev-tip-determining-connection-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Past Month&#8230;ish</title>
		<link>http://kastang.com/blog/2009/01/the-past-monthish/</link>
		<comments>http://kastang.com/blog/2009/01/the-past-monthish/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 05:07:24 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WoW]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[College]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://kastang.com/?p=136</guid>
		<description><![CDATA[Twitter has ruined any form of blogging I used to do. I really have to work on that. Here is what has been going on the past month or so.... iPhone My LG enV started acting up a month ago, I brought it to Verizon and they gave me a bunch of crap that they [...]]]></description>
			<content:encoded><![CDATA[<p>Twitter has ruined any form of blogging I used to do. I really have to work on that. Here is what has been going on the past month or so....</p>
<p><strong>iPhone</strong></p>
<p>My LG enV started acting up a month ago, I brought it to Verizon and they gave me a bunch of crap that they would not replace it. I was not eligible for a discounted upgrade for another three months unless I wanted to extend my contract two years. Instead of selling my soul to Verizon again for another two years, I made the switch to AT&amp;T and the iPhone. AT&amp;T rocks in my area, I have yet to see "No Service" on my iPhone. <strong>So basically AT&amp;T + iPhone = WIN.<br />
</strong></p>
<p>I have been testing out many Applications on my iPhone. Top 5ish favorite apps:</p>
<ul>
<li><strong>Facebook </strong>- Feeds my Facebook addiction while on the road.</li>
<li><strong>BeejiveIM </strong>- Best IM client for the iPhone. Worth every penny.</li>
<li><strong>AroundMe|Yelp</strong> -  I like AroundMe more, but I keep both.</li>
<li><strong>Amazon App | Snaptell </strong>- Take pictures of books at amazon and upload to Amazon reminders, but later for cheaper. Same with Snaptell for books or DVDs.<strong><br />
</strong></li>
<li><strong>Remember The Milk</strong> - Still working with the free trial, but will be buying a year subscription when it runs out. Best GTD app for the iPhone with a nice web interface.</li>
</ul>
<p><em>Other apps: Shovel(Digg App), EverNote, Last.fm, Now Playing, Shazam, Weather Bug, Google App, Urban Spoon, SnapTell, 1Password, WarcraftStat, Characters, Chest, WoWTalent, Stanza.</em></p>
<p><strong>College</strong></p>
<p>College went very well this semester. Classes I took: Comp 1, Introduction to Object Oriented Programming(Java I), Discrete Structures, Intro to Symbolic Logic, Intro to Sociology. Easiest classes were Intro to Sociology and IOOP. Finals were not nearly as bad as I expected them to be. <strong>Finished the semester with a 3.756 GPA</strong>.</p>
<p>Next semesters lineup is: Calc 1, Computer Organization, Foundations of Computer Science, C++, Java II. Hoping this semester will go as smoothly as the first.</p>
<p><strong>World of Warcraft</strong></p>
<p>Started playing WoW again the day after finals were done. Went from 70 - 80 in about 13 days. For those interested, I did 70-72 in Borean Tundra, 73-74 in Howling Fjord, 75-76 in Grizzly Hills, 77-78 in Zul Drak, and hit 80 in Sholazar Basin. Still haven't really touched Ice Crown or Storm Peaks yet. I am geared for Naxx according to <a href="http://be.imba.hu">be.imba.hu</a> Getting into a group will be the difficult part. I don't for see myself quitting WoW again anytime soon. I really enjoy the new WoLK content, BC content just got boring that is why I took my break.</p>
<p>I will have to start balancing WoW with College in a little over a week. I hope it won't be too difficult or I will have to force myself to quit WoW and only play in between semesters which I hope does not happen.</p>
<p><strong>Christmas</strong></p>
<p>I asked for books this year. I hated having nothing new to read when I wanted too. This collection should last me for a bit hopefully:</p>
<ul>
<li>Dresden Files - <a href="http://www.amazon.com/Grave-Peril-Dresden-Files-Book/dp/0451462343/ref=pd_bbs_sr_7?ie=UTF8&amp;s=books&amp;qid=1231642419&amp;sr=8-7"> Grave Peril</a></li>
<li>Dresden Files - <a href="http://www.amazon.com/Summer-Knight-Dresden-Files-Book/dp/0451458923/ref=pd_bbs_sr_3?ie=UTF8&amp;s=books&amp;qid=1231642419&amp;sr=8-3"> Summer Knight</a></li>
<li>Dresden Files - <a href="http://www.amazon.com/Death-Masks-Dresden-Files-Book/dp/0451459407/ref=pd_bbs_5?ie=UTF8&amp;s=books&amp;qid=1231642419&amp;sr=8-5"> Death Masks</a></li>
<li>Dresden Files - <a href="http://www.amazon.com/Blood-Rites-Dresden-Files-Book/dp/0451459873/ref=pd_bbs_sr_6?ie=UTF8&amp;s=books&amp;qid=1231642419&amp;sr=8-6"> Blood Rites</a></li>
<li>Dresden Files - <a href="http://www.amazon.com/Dead-Beat-Dresden-Files-Book/dp/045146091X/ref=pd_bbs_9?ie=UTF8&amp;s=books&amp;qid=1231642419&amp;sr=8-9"> Dead Beat</a></li>
<li>Dresden Files - <a href="http://www.amazon.com/Proven-Guilty-Dresden-Files-Book/dp/0451461037/ref=sr_1_23?ie=UTF8&amp;s=books&amp;qid=1231642570&amp;sr=8-23"> Proven Guilty</a></li>
<li>Dresden Files - <a href="http://www.amazon.com/White-Night-Dresden-Files-Book/dp/045146155X/ref=pd_bbs_sr_11?ie=UTF8&amp;s=books&amp;qid=1231642419&amp;sr=8-11"> White Night</a></li>
<li><a href="http://www.amazon.com/Watchmen-Alan-Moore/dp/0930289234/ref=pd_bbs_2?ie=UTF8&amp;s=books&amp;qid=1231642817&amp;sr=8-2"> Watchmen</a></li>
<li><a href="http://www.amazon.com/Hope-They-Serve-Beer-Hell/dp/0806531061/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1231642835&amp;sr=8-1"> I Hope They Serve Beer In Hell</a></li>
<li><a href="http://www.amazon.com/World-War-Z-History-Zombie/dp/0307346617/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1231642848&amp;sr=8-1"> World War Z: An Oral History of the Zombie War</a></li>
</ul>
<p>Most of the books I received for christmas were from suggestions from friends. My friend <a href="http://snowchyld.org/">Snowchyld</a> currently has me hooked on the Dresden Files. I am currently on the 4th book of the Dresden Series. After completing Summer Knight, I am going to start World War Z based on suggestion from <a href="http://www.somebits.com/weblog/">Nelson Minar</a>.</p>
<p><strong>End</strong></p>
<p>Well, Thats about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://kastang.com/blog/2009/01/the-past-monthish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
