<?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>Cory Collier &#187; google</title>
	<atom:link href="http://corycollier.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://corycollier.com</link>
	<description>Web Developer and System Administrator in Orlando, FL</description>
	<lastBuildDate>Mon, 12 Jul 2010 02:16:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>SXSW Recap</title>
		<link>http://corycollier.com/2009/03/sxsw-recap/</link>
		<comments>http://corycollier.com/2009/03/sxsw-recap/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 23:24:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[alex]]></category>
		<category><![CDATA[austin]]></category>
		<category><![CDATA[bbq]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[david]]></category>
		<category><![CDATA[eric]]></category>
		<category><![CDATA[erik]]></category>
		<category><![CDATA[etan]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ian]]></category>
		<category><![CDATA[jon]]></category>
		<category><![CDATA[kofi]]></category>
		<category><![CDATA[mark]]></category>
		<category><![CDATA[matt]]></category>
		<category><![CDATA[ryan]]></category>
		<category><![CDATA[sxsw]]></category>
		<category><![CDATA[teddy]]></category>
		<category><![CDATA[texas]]></category>
		<category><![CDATA[ushahidi]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=438</guid>
		<description><![CDATA[First, let me publicly announce something: SXSW was worth my time, and I did love going. I learned a few things about myself though, that I&#8217;ll remember for a long time to come. First, while I love people, I cannot hang out with anyone for very long. This isn&#8217;t to say that I don&#8217;t love [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-448" title="sxsw2009" src="http://corycollier.com/wp-content/uploads/2009/03/sxsw2009.gif" alt="sxsw2009" width="240" height="230" />First, let me publicly announce something: <a href="http://sxsw.com/">SXSW</a> was worth my time, and I did love going. I learned a few things about myself though, that I&#8217;ll remember for a long time to come.</p>
<p>First, while I love people, I cannot hang out with anyone for very long. This isn&#8217;t to say that I don&#8217;t love my friends who I hung out with at SXSW. I have some amazing friends, who likely saw an uglier side of me in Texas. That&#8217;s a shame, and I cannot express my apologies to them enough.</p>
<p>Second, celebrity fawning is just as much of an issue in tech circles as it is anywhere else. The very things I despise about Hollywood culture are very prevalent in the Valley culture as well. Anyone that knows me, knows how I absolutely despise treating people as anything more than that.</p>
<p>A funny thing happened while I was there however.<span id="more-438"></span></p>
<p>I sat in one of the last talks of the conference. When it was over I got up to collect my stuff to leave. I noticed someone collecting themselves behind me. It was <a title="Matt Cutts - Head of Google's Webspam Team" href="http://www.mattcutts.com/blog/">Matt Cutts</a>. For those of you who don&#8217;t know who Matt Cutts is, he&#8217;s the head of Google&#8217;s web spam team. He&#8217;s directly responsible for helping ensure the links you click on Google&#8217;s search results are valid.</p>
<p>I was completely star struck.</p>
<p>Matt was awesome. He&#8217;s a very level-headed, clean, nice guy. He even gave me a few breath mints (maybe I needed them). He even uses a PC (whoa). After a few minutes of chatting about relevant search results in google, and keeping the results clean (when desired), he went on to talk to some other people.</p>
<p>The absence made me realize, that for as much as I hated people worshiping other people, I was doing it too. Matt Cutts represents a guy who does things that I admire, and hope to imitate. I suspect other people fawn over folks they feel the same about.</p>
<p>So, I&#8217;d like to publicly apologize for being rude to some folks on twitter, and (more importantly) to my friends who tolerated me at SXSW. I had a great time, and it was better because all of you who were with me. It just took me a while to realize it. To those of you who were there: I was a big bag of douche, and I appreciate your ability to let me figure it out myself.</p>
<p>I&#8217;d like to recap all of SXSW, but it&#8217;d take weeks for me to write it and days for you to read it. I&#8217;ll just go on a rant about some of the other folks I met while I was there (Besides the awe-inspiring super-duper Matt Cutts). I&#8217;m horrible at remembering names (and I was drunk a lot), so if I butcher your name, _please_ forgive me.</p>
<p>The first night, I went out on my own. I saw <a href="http://www.ted.me/">Ted</a>, then went to a bar off 6th st. Later, I was able to hang out with the Blogsmith guys (Plus the always awesome Erik Hersman). <a href="http://gavinhall.org">Gavin</a>, <a href="http://michaelrhing.com/">Mike</a>, Krystoff, and Bill were all a blast to hang out with and share a few 7&amp;7s with. We had Thai and saw a burlesque show at Emos. Some of those girls had more hair on their armpits than me.</p>
<p><a href="http://www.flickr.com/photos/corycollier/3368199860/in/set-72157615119490397/"><img class="alignleft" title="Me and my finger at Gingerman" src="http://farm4.static.flickr.com/3437/3368199860_2e75643eef.jpg?v=0" alt="" width="300" height="225" /></a>The next night <a href="http://xentek.net">Eric</a>, <a href="http://floridacreatives.com">Ryan</a>, (who I shared a hotel room with) and me hung out at Gingerman. Gingerman is a story by itself (it has Old Rasputin Stout on tap). While we were hanging out, we met some of the guys and girls from Agency Net. I&#8217;m from West Palm, which is about 35 miles north of Ft. Lauderdale, where Agency Net calls home. <a href="http://twitter.com/Nini6485">Nini</a> was taking pictures and hanging out with Larissa, while <a href="http://elsanchez.com/">Augustin</a>, <a href="http://chrisfullman.com">Chris</a>, and I talked about comic books and <a href="http://floridadeathmetal.com">Death Metal</a>.</p>
<p><a href="http://www.flickr.com/photos/corycollier/3367374129/in/set-72157615119490397/"><img class="alignleft" title="Teddy, Cory, Erik, Kofi and David" src="http://farm4.static.flickr.com/3422/3367374129_eff02891b2.jpg?v=0" alt="" width="300" height="225" /></a>The same night, Ryan and I went to the official opening party (Eric went back to the hotel, sick), and met the rest of the <a href="http://ushahidi.com">Ushahidi</a> guys. <a href="http://www.dkfactor.com/">David</a>, <a href="http://projectdiaspora.org/">Teddy</a>, <a href="http://whiteafrican.com">Erik</a> (Hersman, same as above), <a href="http://appfrica.net/blog/">Jon</a>, and <a href="http://annansi.com/">Kofi</a> were all at the party, and it was awesome to meet them. They are likely some of the coolest people I met the entire time was in Austin (sorry to everyone else, but those guys are pretty awesome). They (minus Kofi) did a panel talk on <a href="http://tmsruge.smugmug.com/gallery/7662309_58gKN#P-1-16">web apps in emerging markets</a>. One of the things I&#8217;m most certain about right now, is how much I intend to get involved with Ushahidi. Awesome stuff.</p>
<p>On Sunday, Alex cued me in on a conservative meetup at Moonshine, &#8216;Right-By-Southwest&#8217;. The event was put on by by <a href="http://www.patrickruffini.com/">Patrick Ruffini</a>, on behalf of Michael Williams. Some of the awesome folks I met: <a href="http://slash25.com/">Pat</a>, <a href="http://americanmajority.org/">Ned</a>, <a href="http://spn.org">Joe</a>, and <a href="http://urbangrounds.com/">Robbie</a> were all awesome to talk to and hang with. Hearing Michael Williams talk about his experiences in the mis-named Texas Railway Authority was awesome. Some people exude a sense of awesome, and Mr. Williams is definitely one of those guys.</p>
<p>Somewhere in-between all this, I met some other folks. I don&#8217;t remember when, or how but I recall meeting <a href="http://ubervu.com">Vladimir</a>, <a href="http://alextom.com">Billy</a>, <a href="http://www.toddsampson.com/">Todd</a>, and <a href="http://turner.com">Seth</a>.</p>
<p><a href="http://www.flickr.com/photos/corycollier/3367370071/in/set-72157615119490397/"><img class="alignleft" src="http://farm4.static.flickr.com/3441/3367370071_6894ac66fa.jpg?v=0" alt="" width="300" height="225" /></a>Also in between all of this was BarCamp Miami. I definitely love a BarCamp, and this was definitely the craziest BarCamp I have ever seen. Eric, Erik, and Ryan presented (all in different rooms). Good times there. The were even handing out free burritos. I expected the burritos to suck (free, right), but they were freakin awesome.</p>
<p><a href="http://www.flickr.com/photos/corycollier/3367382255/in/set-72157615119490397/"><img class="alignleft" src="http://farm4.static.flickr.com/3456/3367382255_a0f612b35c.jpg?v=0" alt="" width="300" height="225" /></a>Monday, we had the Florida Creatives meetup at Gingerman (that place is awesome). Erik, <a href="http://alexrudloff.com">Alex</a>, Eric, <a href="http://coveredwebservices.com">Mark</a>, Ryan, <a href="http://etanhorowitz.com/">Etan</a>, and a few others (bad with names, sorry) all hung out for a few hours to continue the tradition we&#8217;ve kept for years now. It was good to have a little home nostalgia over a thousand miles away from home. I&#8217;d met Mark Jaquith before, but never had much chance to talk. It was cool to talk about some non-tech stuff with someone who I respect a bunch. I got too drunk that night, and punched a parking meter. While my hand is still bruised, I&#8217;ll bet that parking meter will think twice.</p>
<p>Tuesday was the final day of the conference. I met some cool guys from <a href="http://ynot.com">YNot</a>, presenting on a panel about how to make money in the adult industry. The lessons were pretty typical actually. Meet people, build trust, don&#8217;t suck. Afterwards I went to the finale party. I don&#8217;t remember the name of the place, but I do recall it had a mechanical bull.</p>
<p>I saw <a href="http://twisten.fm/">Vishal</a> there with a very pretty friend of his (whose name I do not recall). I met Vishal at FOWA, and he&#8217;s a pretty awesome guy. His friend was pushing PR for New Orleans. I mentioned she had work left to be done. She agreed, but had me swear I&#8217;d be an evangelist for New Orleans. So, here I am &#8230; <img src='http://corycollier.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>After that I hung with Teddy and Jon the rest of the night. I said it before, but those guys really are awesome.</p>
<p><a href="http://www.flickr.com/photos/corycollier/3367386237/"><img class="alignleft" src="http://farm4.static.flickr.com/3429/3367386237_1d296a3faf.jpg?v=0" alt="" width="300" height="225" /></a>The next day I came home. I was hungover (from drinking) and sick (from Ryan). My plane was delayed for hours. I&#8217;m pretty happy to be home, but I&#8217;m happier that I went to South By Southwest</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2009/03/sxsw-recap/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Reader and Zend_Http_Client Saves Time</title>
		<link>http://corycollier.com/2008/11/google-reader-and-zend_http_client-saves-time/</link>
		<comments>http://corycollier.com/2008/11/google-reader-and-zend_http_client-saves-time/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 22:24:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[reader]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend_http_client]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=281</guid>
		<description><![CDATA[I&#8217;ve been working a lot on Florida Death Metal lately. Part of that means that I need to know news, as it happens, from a lot of different sources. That can be difficult (and a pain in the ass) to keep track of. The last thing I want to do, is visit 50 different sites [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working a lot on <a title="Florida Death Metal" href="http://floridadeathmetal.com">Florida Death Metal</a> lately. Part of that means that I need to know news, as it happens, from a lot of different sources. That can be difficult (and a pain in the ass) to keep track of. The last thing I want to do, is visit 50 different sites every 15 minutes to see if there&#8217;s any news I should know about.</p>
<p>The first thing I did, to filter input, was to setup a <a title="Google Reader" href="http://google.com/reader">Google Reader</a> account for Florida Death Metal. At least this allowed me to see updates from a variety of other sites in a single place. This also allows me to search through those new listings for keywords to bands and events I think are important to know about.</p>
<p>This still requires me to visit Google Reader, and parse through a lot of stuff (routinely over 1000 new items) to find out what&#8217;s going on in the world. The real dilemma I was having, was trying to implement an active alert system to news going on around me. The active part, was me actively searching through Google Reader for information relevant to Florida Death Metal. </p>
<p>Needless to say, this started to suck. I have a great full time job, a wonderful wife, and a million other things I like to do with my spare time. Spending my days and nights on Google Reader, struggling to keep up with news for a project blew.</p>
<p>I love Florida Death Metal. I&#8217;ve never been involved in something that means so much to me. However, there are only so many days in the week, and so much time in each of those days. I need a way to passively keep up with relevant news and events. I needed some automation, so I could spend time hanging drapes for Melissa, or having a beer with Rob.</p>
<p>Enter <a title="Zend Http Client" href="http://framework.zend.com/manual/en/zend.http.html">Zend_Http_Client</a> &#8230;.</p>
<p>One of my favorite programming tricks is breaking down requests to servers, and finding a way to do them programatically. So, I got to thinking about how I could parse through all of my stuff in Google Reader. For each of the views in Google Reader, there is an associated RSS feed. Well, that makes things simple enough. I could just grab the RSS feed and parse it. </p>
<p>One minor detail, the RSS feeds aren&#8217;t publicly available. You have to be logged in to use them. This makes sense. I imagine Google doesn&#8217;t want to be used as an aggregator of RSS feeds to be used as a proxy to other sites. Sorry :/</p>
<p>So, here&#8217;s a breakdown of what I needed to write a script to do:</p>
<ol>
<li>Login to Google</li>
<li>Grab the RSS Feed for &#8216;All Items&#8217;</li>
<li>Parse the RSS Feed for keywords relevant to Florida Death Metal</li>
<li>Email me alerts (if there are matches)</li>
</ol>
<p>Not too bad. So, Here&#8217;s the script I came up with. I hope you like it :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #00ff00; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Description: Script to parse through a google reader aggregation of content for keywords
Version: 1.0
Author: Cory Collier
Author URI: http://corycollier.com/
*/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Define the constants required for the script</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'GOOGLE_PASSWORD'</span><span style="color: #ffff00;">,</span> 	<span style="color: #00ffff;">'&lt;your password here&gt;'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'GOOGLE_RSS_URI'</span><span style="color: #ffff00;">,</span> 		<span style="color: #00ffff;">'&lt;the url for your google reader rss feed&gt;'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'GOOGLE_LOGIN_URI'</span><span style="color: #ffff00;">,</span>		<span style="color: #00ffff;">'https://www.google.com/accounts/ServiceLoginAuth?service=reader'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'GOOGLE_LOGIN_EMAIL'</span><span style="color: #ffff00;">,</span> 	<span style="color: #00ffff;">'&lt;your gmail account username / email&gt;'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'MAILER_FROM_ADDR'</span><span style="color: #ffff00;">,</span>		<span style="color: #00ffff;">'&lt;where the email should come from&gt;'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'MAILER_TO_ADDR'</span><span style="color: #ffff00;">,</span>		<span style="color: #00ffff;">'&lt;where the email should go to&gt;'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
<span style="color: #00ff00;">define</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'MAILER_SUBJECT'</span><span style="color: #ffff00;">,</span>		<span style="color: #00ffff;">'Google Reader Parsing'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
* a Zend Framework Installation _MUST_ be located on the include path for PHP
*/</span>
<span style="color: #ffff00;">require</span> <span style="color: #00ffff;">'Zend/Loader.php'</span><span style="color: #ffff00;">;</span>
Zend_Loader<span style="color: #ffff00;">::</span><span style="color: #ffffff;">registerAutoload</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Instantiate a new Zend_Http_Client, with the google login url</span>
<span style="color: #00ffff;">$client</span> <span style="color: #ffff00;">=</span> <span style="color: #00ff00; font-weight: bold;">new</span> Zend_Http_Client<span style="color: #ff00ff;">&#40;</span>GOOGLE_LOGIN_URI<span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
 * Set the client cookie jar ...
 * Set the method to POST ..
 * Set the parameters to post with
 */</span>
<span style="color: #00ffff;">$client</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setCookieJar</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#41;</span>
	<span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setMethod</span><span style="color: #ff00ff;">&#40;</span>Zend_Http_Client<span style="color: #ffff00;">::</span><span style="color: #ffffff;">POST</span><span style="color: #ff00ff;">&#41;</span>
	<span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setParameterPost</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ff00;">array</span><span style="color: #ff00ff;">&#40;</span>
		<span style="color: #00ffff;">'continue'</span>		<span style="color: #ffff00;">=&gt;</span> GOOGLE_RSS_URI<span style="color: #ffff00;">,</span>
		<span style="color: #00ffff;">'service'</span>		<span style="color: #ffff00;">=&gt;</span> <span style="color: #00ffff;">'reader'</span><span style="color: #ffff00;">,</span>
		<span style="color: #00ffff;">'niu'</span>			<span style="color: #ffff00;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #ffff00;">,</span>
		<span style="color: #00ffff;">'hl'</span>			<span style="color: #ffff00;">=&gt;</span> <span style="color: #00ffff;">'en'</span><span style="color: #ffff00;">,</span> 
		<span style="color: #00ffff;">'Email'</span>		<span style="color: #ffff00;">=&gt;</span> GOOGLE_LOGIN_EMAIL<span style="color: #ffff00;">,</span>
		<span style="color: #00ffff;">'Passwd'</span>		<span style="color: #ffff00;">=&gt;</span> GOOGLE_PASSWORD<span style="color: #ffff00;">,</span>
		<span style="color: #00ffff;">'PersistentCookie'</span>	<span style="color: #ffff00;">=&gt;</span> <span style="color: #00ffff;">'yes'</span><span style="color: #ffff00;">,</span>
		<span style="color: #00ffff;">'asts'</span>			<span style="color: #ffff00;">=&gt;</span> <span style="color: #00ffff;">''</span>
<span style="color: #ff00ff;">&#41;</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//make the login request, and store the response in the $response variable ...</span>
<span style="color: #00ffff;">$response</span> <span style="color: #ffff00;">=</span> <span style="color: #00ffff;">$client</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">request</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">'POST'</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//If the response was successful, change the uri value for the client object</span>
<span style="color: #666666; font-style: italic;">// to the appropriate rss file for parsing</span>
<span style="color: #00ffff;">$client</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setUri</span><span style="color: #ff00ff;">&#40;</span>GOOGLE_RSS_URI<span style="color: #ff00ff;">&#41;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Change the request method to GET</span>
		<span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setMethod</span><span style="color: #ff00ff;">&#40;</span>Zend_Http_Client<span style="color: #ffff00;">::</span><span style="color: #ffffff;">GET</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">//send the request, and store the results of it</span>
<span style="color: #00ffff;">$response</span> <span style="color: #ffff00;">=</span> <span style="color: #00ffff;">$client</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">request</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Initialize an array of keywords to look for</span>
<span style="color: #00ffff;">$keywords</span> <span style="color: #ffff00;">=</span> <span style="color: #00ff00;">array</span> <span style="color: #ff00ff;">&#40;</span>
	<span style="color: #666666; font-style: italic;">//Whatever your keywords are you're looking for</span>
<span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//SimpleXML is great!</span>
<span style="color: #00ffff;">$sx</span> <span style="color: #ffff00;">=</span> simplexml_load_string <span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">$response</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">getBody</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Iterate through each of the retrieved entries</span>
<span style="color: #ffff00;">foreach</span> <span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">$sx</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">entry</span> <span style="color: #ffff00;">as</span> <span style="color: #00ffff;">$entry</span> <span style="color: #ff00ff;">&#41;</span> 
<span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//Now, iterate through each of the defined keywords / keyphrases</span>
    <span style="color: #ffff00;">foreach</span> <span style="color: #ff00ff;">&#40;</span> <span style="color: #00ffff;">$keywords</span> <span style="color: #ffff00;">as</span> <span style="color: #00ffff;">$keyword</span> <span style="color: #ff00ff;">&#41;</span> 
    <span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//First, check to see if the title contains a keyword / keyphrase</span>
        <span style="color: #ffff00;">if</span> <span style="color: #ff00ff;">&#40;</span> <span style="color: #00ff00;">stristr</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#40;</span>string<span style="color: #ff00ff;">&#41;</span><span style="color: #00ffff;">$entry</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">title</span><span style="color: #ffff00;">,</span> <span style="color: #00ffff;">$keyword</span><span style="color: #ff00ff;">&#41;</span> <span style="color: #ff00ff;">&#41;</span> 
        <span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//Append any matches to the matches arrays</span>
            <span style="color: #00ffff;">$matches</span><span style="color: #ff00ff;">&#91;</span><span style="color: #ff00ff;">&#93;</span> <span style="color: #ffff00;">=</span> <span style="color: #ff00ff;">&#40;</span>string<span style="color: #ff00ff;">&#41;</span><span style="color: #00ffff;">$entry</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">link</span><span style="color: #ff00ff;">&#91;</span><span style="color: #00ffff;">'href'</span><span style="color: #ff00ff;">&#93;</span><span style="color: #ffff00;">;</span>
        <span style="color: #ff00ff;">&#125;</span>
    	<span style="color: #666666; font-style: italic;">//Next, check to see if there are any matches in the summary</span>
        <span style="color: #ffff00;">if</span> <span style="color: #ff00ff;">&#40;</span> <span style="color: #00ff00;">stristr</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#40;</span>string<span style="color: #ff00ff;">&#41;</span><span style="color: #00ffff;">$entry</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">summary</span><span style="color: #ffff00;">,</span> <span style="color: #00ffff;">$keyword</span><span style="color: #ff00ff;">&#41;</span> <span style="color: #ff00ff;">&#41;</span> 
        <span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//same deal: If there are matches, add them to the stack</span>
            <span style="color: #00ffff;">$matches</span><span style="color: #ff00ff;">&#91;</span><span style="color: #ff00ff;">&#93;</span> <span style="color: #ffff00;">=</span> <span style="color: #ff00ff;">&#40;</span>string<span style="color: #ff00ff;">&#41;</span><span style="color: #00ffff;">$entry</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">link</span><span style="color: #ff00ff;">&#91;</span><span style="color: #00ffff;">'href'</span><span style="color: #ff00ff;">&#93;</span><span style="color: #ffff00;">;</span>
        <span style="color: #ff00ff;">&#125;</span>
    <span style="color: #ff00ff;">&#125;</span> <span style="color: #666666; font-style: italic;">//END keyword iteration</span>
&nbsp;
<span style="color: #ff00ff;">&#125;</span> <span style="color: #666666; font-style: italic;">// END posting iteration</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//IF matches were found, send an email</span>
<span style="color: #ffff00;">if</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ff00;">count</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">$matches</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ff00ff;">&#41;</span> 
<span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//Initialize a variable to store a mesage in</span>
    <span style="color: #00ffff;">$message</span> <span style="color: #ffff00;">=</span> <span style="color: #00ffff;">''</span><span style="color: #ffff00;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Iterate through each of the matches</span>
    <span style="color: #ffff00;">foreach</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">$matches</span> <span style="color: #ffff00;">as</span> <span style="color: #00ffff;">$match</span><span style="color: #ff00ff;">&#41;</span>
    <span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//For each of the matches, append them to the message string, separated </span>
    	<span style="color: #666666; font-style: italic;">// by newlines</span>
        <span style="color: #00ffff;">$message</span> <span style="color: #ffff00;">.=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #ffff00;">.</span>  <span style="color: #00ffff;">$match</span><span style="color: #ffff00;">;</span>  
    <span style="color: #ff00ff;">&#125;</span>
    <span style="color: #666666; font-style: italic;">//Initialize a new Zend_Mail object </span>
    <span style="color: #00ffff;">$mail</span> <span style="color: #ffff00;">=</span> <span style="color: #00ff00; font-weight: bold;">new</span> Zend_Mail<span style="color: #ffff00;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Set the parameters necessary to send a message </span>
    <span style="color: #00ffff;">$mail</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">addTo</span><span style="color: #ff00ff;">&#40;</span>MAILER_TO_ADDR<span style="color: #ff00ff;">&#41;</span>
        <span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setFrom</span><span style="color: #ff00ff;">&#40;</span>MAILER_FROM_ADDR<span style="color: #ff00ff;">&#41;</span>
        <span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setSubject</span><span style="color: #ff00ff;">&#40;</span>MAILER_SUBJECT<span style="color: #ff00ff;">&#41;</span>
        <span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">setBodyText</span><span style="color: #ff00ff;">&#40;</span><span style="color: #00ffff;">$message</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//I never trust email, so wrap the email execution in a try/catch statement</span>
    try  
    <span style="color: #ff00ff;">&#123;</span>	<span style="color: #666666; font-style: italic;">//Send the mail</span>
        <span style="color: #00ffff;">$mail</span><span style="color: #ffff00;">-&gt;</span><span style="color: #ff00ff;">send</span><span style="color: #ff00ff;">&#40;</span><span style="color: #ff00ff;">&#41;</span><span style="color: #ffff00;">;</span>   
    <span style="color: #ff00ff;">&#125;</span> catch <span style="color: #ff00ff;">&#40;</span>Exception <span style="color: #00ffff;">$e</span> <span style="color: #ff00ff;">&#41;</span><span style="color: #ff00ff;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//Do something here</span>
    <span style="color: #ff00ff;">&#125;</span>
<span style="color: #ff00ff;">&#125;</span></pre></div></div>

<p>Wrapping all of this up, I stuck this script on a spare <a title="Debian, The Most Awesome Linux Distribution Ever!" href="http://www.debian.org/">debian</a> box at my house, and setup a cronjob to run the script every 15 minutes. It saves me a lot of time. I&#8217;d love to hear some feedback from y&#8217;all about how I got this done. I&#8217;m a script guy at heart. So, this stuff is super fun for me.</p>
</pre>
<p>Wrapping all of this up, I stuck this script on a spare <a title="Debian, The Most Awesome Linux Distribution Ever!" href="http://www.debian.org/">debian</a> box at my house, and setup a cronjob to run the script every 15 minutes. It saves me a lot of time. I'd love to hear some feedback from y'all about how I got this done. I'm a script guy at heart. So, this stuff is super fun for me.</p>
<p>I know I should have checked the success of the initial login attempt before assuming the second request would get anything at all. Keep in mind though, this is a script I use to make my own life easier. Exceptions being thrown here cause me no harm. If I don't get anything, I can check my error logs for issues. Not a perfect solution, but it's working pretty well for me now. <img src='http://corycollier.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2008/11/google-reader-and-zend_http_client-saves-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Saves E-Mail!</title>
		<link>http://corycollier.com/2008/05/google-saves-e-mail/</link>
		<comments>http://corycollier.com/2008/05/google-saves-e-mail/#comments</comments>
		<pubDate>Wed, 21 May 2008 01:36:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=54</guid>
		<description><![CDATA[I use email a lot. I&#8217;m sure many of you do as well. So why not have a super-safe way to keep all of your email (from as many accounts as you might have) in one place, and get some virus protection to boot? Sound too good to be true? It&#8217;s available to you right [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-for-you.jpg"><img class="alignleft size-full wp-image-63" title="gmail-for-you" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-for-you.jpg" alt="" width="180" height="115" /></a>I use email a lot. I&#8217;m sure many of you do as well. So why not have a super-safe way to keep all of your email (from as many accounts as you might have) in one place, and get some virus protection to boot?</p>
<p>Sound too good to be true? It&#8217;s available to you right now. Thanks god, errr&#8230;. google&#8230;..</p>
<p><strong>Get Google To Store All Your Email</strong></p>
<p>First, login to gmail (yeah, you have to login first :/ ). Next, find the &#8216;Settings&#8217; link in the top right of your browser.<span id="more-54"></span><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-1.jpg"><img class="alignnone size-full wp-image-55" title="gmail-1" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-1.jpg" alt="" width="500" height="206" /></a></p>
<p>Once you&#8217;ve clicked on that, you&#8217;ll see the settings page, with some options in the top. You&#8217;ll want to click the &#8216;Accounts&#8217; link in the top left</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-2.jpg"><img class="alignnone size-full wp-image-56" title="gmail-2" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-2.jpg" alt="" width="499" height="309" /></a></p>
<p>After you&#8217;ve gotten there, notice the region (towards the bottom of the page) that says &#8216;Get mail from other accounts&#8217;.</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-3.jpg"><img class="alignnone size-full wp-image-57" title="gmail-3" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-3.jpg" alt="" width="500" height="123" /></a></p>
<p>This is where you&#8217;ll add email accounts from. Go ahead and click the &#8216;Add account&#8217; link. After you do this, you should be presented with a pop-up window that will ask you for the email address you wish to replicate on google. It looks like this:</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-5.jpg"><img class="alignnone size-full wp-image-58" title="gmail-5" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-5.jpg" alt="" width="438" height="187" /></a></p>
<p>Go ahead and enter whatever email address you want to use, and click &#8216;Next Step&#8217;. After you&#8217;ve gotten that accomplished, you&#8217;ll be presented with something slightly more involved. Don&#8217;t worry it&#8217;s not too tough to get through.</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-6.jpg"><img class="alignnone size-full wp-image-59" title="gmail-6" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-6.jpg" alt="" width="500" height="432" /></a></p>
<p>So, the first thing you enter is your username. Most of the time, that will be your full email address. Your password is, well, your password. The POP server is something for you to figure out. Usually, it&#8217;s mail.your-domain.com. So, if your email address is joeballs@physics.org, then the POP server is probably mail.physics.org. Sometimes it&#8217;s pop.physics.org, or pop3.physics.org.</p>
<p>Anyways, once you figure that out, and get it in there, you have a few choices to make.</p>
<p>The checkbox that allows you to leave a copy of the retrieved message on the server can be important. I think I speak for sys admins accross the internet when I say &#8216;Dont check this box!&#8217;. The reason: if you leave this box unchecked, google will remove a message from your server once google downloads it. That&#8217;s great for disk space, and since google seems to be growing hard drives on trees, they might as well do all the storing.</p>
<p>The next option you have, is to use SSL when connecting to your POP server. If your POP server supports this option, do it. While it&#8217;s not likely, it is possible for someone to see your emails as Google downloads them from your mail server. Since e-mail is usually personal, you probably don&#8217;t want this to happen.</p>
<p>After that, there&#8217;s the option to label incoming messages. I really recommend you do this, especially if you&#8217;re using more than one email account here. It really helps to distinguish which email was sent to which address.</p>
<p>Finally, you have the option to Archive incoming messages, so they never hit your inbox. I never use this option, so I can&#8217;t really speak to why you&#8217;d want to. I&#8217;m sure some of you have a reason, so try that one at your own leisure.</p>
<p><strong>Get Google To Send Mail For You</strong></p>
<p>Having Google store all of your mail is only half the battle. The next part, is having google send mail for you too. Back in the &#8216;Accounts&#8217; tab of the &#8216;Settings&#8217; page, find the area for &#8216;Send mail as:&#8217;</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-7.jpg"><img class="alignnone size-full wp-image-60" title="gmail-7" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-7.jpg" alt="" width="500" height="269" /></a></p>
<p>You have the option to add an email address here. Go ahead and click this. Once you do, another pop-up window will appear that will look like this:</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-8.jpg"><img class="alignnone size-full wp-image-61" title="gmail-8" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-8.jpg" alt="" width="500" height="359" /></a></p>
<p>You&#8217;ll be prompted for your name and email address. You even have the option to specifiy a different reply-to email address. Go ahead and fill those 2 fields out, then click &#8216;Next Step&#8217;. Then, you&#8217;ll be presented with another window :</p>
<p><a href="http://corycollier.com/wp-content/uploads/2008/05/gmail-9.jpg"><img class="alignnone size-full wp-image-62" title="gmail-9" src="http://corycollier.com/wp-content/uploads/2008/05/gmail-9.jpg" alt="" width="500" height="359" /></a></p>
<p>This is a prompt to let you know an email will be sent to the email address you&#8217;re trying to send as. This helps prevent other people from sending mail on your behalf without you knowing about it. Go ahead and click the &#8216;Send Verification&#8217; button. Google will now send you an email verifying that you actually have a right to send mail as that email. When you get the email, click the link in it, and you&#8217;re done.</p>
<p><strong>Wrapping Up &#8230;</strong></p>
<p>Google has an awesome ability to filter spam and viruses from email. Using Gmail as a proxy for your email cuts down on the spam you recieve, and the likelyhood you&#8217;ll get a virus from your buddy. Even better, you get to use gmail&#8217;s awesome web interface for all of your email.</p>
<p>Currently Gmail supports IMAP integration as well, so your email client (or iPhone) can use IMAP to replicate folders (labels) in GMail. I&#8217;ve heard that&#8217;s a little buggy right now, but I&#8217;m sure fixes are on the way.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2008/05/google-saves-e-mail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pink Lemons?</title>
		<link>http://corycollier.com/2007/08/pink-lemons/</link>
		<comments>http://corycollier.com/2007/08/pink-lemons/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 16:57:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[pink lemon]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=34</guid>
		<description><![CDATA[The internet certainly is a funny thing. A while ago I posted news that Google Analytics was down. Well, a french guy running Pink Lemon , cited me and gave me a link back. I&#8217;m flattered. I guess that means I can&#8217;t keep talking trash about the french!]]></description>
			<content:encoded><![CDATA[<p>The internet certainly is a funny thing. A while ago I posted news that Google Analytics was down. Well, a french guy running <a title="Pink Lemon" href="http://pinklemonblog.blogspot.com/">Pink Lemon</a> , cited me and gave me a link back.</p>
<p>I&#8217;m flattered. I guess that means I can&#8217;t keep talking trash about the french!</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/08/pink-lemons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Analytics is Down!</title>
		<link>http://corycollier.com/2007/07/google-analytics-is-down/</link>
		<comments>http://corycollier.com/2007/07/google-analytics-is-down/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 22:33:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[outage]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=29</guid>
		<description><![CDATA[Google Analytics is Down! That&#8217;s the worst news any webmaster can hear. I&#8217;ve already received phone calls from clients wondering why they&#8217;ve lost traffic to their site. It appears that people can still use their account, but recent visits aren&#8217;t showing up. The official story is the data isn&#8217;t lost. It&#8217;s still being collected. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Google Analytics is Down! That&#8217;s the worst news any webmaster can hear. I&#8217;ve already received phone calls from clients wondering why they&#8217;ve lost traffic to their site. It appears that people can still use their account, but recent visits aren&#8217;t showing up.</p>
<p>The official story is the data isn&#8217;t lost. It&#8217;s still being collected. It&#8217;s just taking a while for google to fix their issue and get the recent traffic data out to the public.</p>
<p>The exact cause of the outage has yet to be released. However, there is a lot of speculation that it&#8217;s due to the &#8216;upgrade&#8217; that the reporting service received in May. That upgrade caused a similar, but less severe outage, back then as well.</p>
<p>There&#8217;s a good thread going about this <a title="Google Analytics is down, forum" href="http://groups.google.com/group/analytics-help-basics/browse_thread/thread/d65e41aceb928966/bc210e129dde1de6#bc210e129dde1de6">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/07/google-analytics-is-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
