<?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>Gregg Hilferding</title>
	<atom:link href="http://www.whoisgregg.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whoisgregg.com/blog</link>
	<description>Web Development, Apple Stuff, and More</description>
	<lastBuildDate>Fri, 13 May 2011 16:32:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Even More Fun With Charts: Making the Poor Look Rich</title>
		<link>http://www.whoisgregg.com/blog/blog/2011/05/13/even-more-fun-with-charts-making-the-poor-look-rich/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2011/05/13/even-more-fun-with-charts-making-the-poor-look-rich/#comments</comments>
		<pubDate>Fri, 13 May 2011 16:32:45 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=535</guid>
		<description><![CDATA[So it started with a graph. Which was followed by a rebuttal and a follow up graphic. The claim? Well, rich people are actually a single category of wage earner and "rich" starts at (according to Jonathan Chait) $200K. So any chart that breaks down income in increments larger than $200K is faulty. If it [...]]]></description>
			<content:encoded><![CDATA[<p>So it started with <a href="http://online.wsj.com/article/SB10001424052748704621304576267113524583554.html">a graph</a>. Which was followed by <a href="http://www.tnr.com/blog/jonathan-chait/88172/does-the-middle-class-have-all-the-money">a rebuttal</a> and a <a href="http://motherjones.com/kevin-drum/2011/05/fun-charts-making-rich-look-poor">follow up graphic</a>.</p>
<p>The claim? Well, rich people are actually a single category of wage earner and "rich" starts at (according to Jonathan Chait) $200K. So any chart that breaks down income in increments larger than $200K is faulty.</p>
<p>If it makes sense to lump all "rich" people into one category, it hardly seems fair to break down all other income levels. So let's see how income is truly distributed if all income earners at $100K and below are lumped together:</p>
<p><a href="http://www.whoisgregg.com/blog/wp-content/uploads/2011/05/blog_where_money_is.jpg"><img src="http://www.whoisgregg.com/blog/wp-content/uploads/2011/05/blog_where_money_is.jpg" alt="" title="blog_where_money_is" width="680" height="380" class="alignnone size-full wp-image-536" /></a></p>
<p>Sweet, turns out the "poor" have more money than the "rich" after all. </p>
<p>Maybe we should stick to data in the first place?</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2011/05/13/even-more-fun-with-charts-making-the-poor-look-rich/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stress Is a Good Thing</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/09/28/stress-is-a-good-thing/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/09/28/stress-is-a-good-thing/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 17:18:19 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Noise]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=523</guid>
		<description><![CDATA[In high school Psychology class, we once took a test that assigned point values to different life events. Of course, being in high school wasn't listed but probably would have been worth 100 points. :) After checking off events that occured during the last 12 months, you would be able to gauge how the stress [...]]]></description>
			<content:encoded><![CDATA[<p>In high school Psychology class, we once took a test that assigned point values to different life events. Of course, being in high school wasn't listed but probably would have been worth 100 points. :)</p>
<p>After checking off events that occured during the last 12 months, you would be able to gauge how the stress in your life was affecting your susceptiblity to illness. Presumably, striving to avoid stressors was the key to a long and healthy life.</p>
<p>I found one of these <a href="http://www.healthcentral.com/sleep-disorders/stress-test-3454-143.html">stress tests</a> online and took it today, but I only included things that have occured in the last TWO months. The results?</p>
<blockquote>
<p><strong>Your total stress score is 426</strong></p>
<p><strong>If your score totals 150 or more: </strong>You have a 50-50 chance of developing an illness.</p>
<p><strong>If your score totals 300 or more: </strong>You have a 90 percent chance of developing an illness.</p>
</blockquote>
<p>In the last couple years, I have specifically tried to seek additional stress in my life. I've taken on more volunteer work, become more active in local interest groups, and tried to fill my schedule however I can. To me, if I'm not doing those things, I'm not actually living. And, while I may suffer from a few additional colds each year, I can't imagine giving it up.</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/09/28/stress-is-a-good-thing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>This Is Long Overdue.</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/04/29/this-is-long-overdue/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/04/29/this-is-long-overdue/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 23:19:52 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Signal]]></category>
		<category><![CDATA[Webmaster]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=510</guid>
		<description><![CDATA[I've made some additions to my /etc/hosts file: 66.135.33.106 gizmodo.com 66.135.33.106 experts-exchange.com 66.135.33.106 techcrunch.com I already avoid reading these sites since I dislike their business practices. But search engines I use and people I know keep linking to these sites despite my opinions. ;) When I click those links without realizing the destination, I twinge [...]]]></description>
			<content:encoded><![CDATA[<p>I've made some additions to my <a href="http://en.wikipedia.org/wiki/Hosts_file">/etc/hosts file</a>:</p>
<p><code>66.135.33.106 gizmodo.com<br />
66.135.33.106 experts-exchange.com<br />
66.135.33.106 techcrunch.com</code></p>
<p>I already avoid reading these sites since I <a href="http://www.marco.org/438103070">dislike their business practices</a>. But search engines I use and people I know keep linking to these sites despite my opinions. ;)</p>
<p>When I click those links without realizing the destination, I twinge imagining that I've contributed even 1¢ to any of these sites by loading a CPM ad.</p>
<p><em>Never again.</em></p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/04/29/this-is-long-overdue/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>First Kiva, Now Kickstarter.</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/03/26/first-kiva-now-kickstarter/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/03/26/first-kiva-now-kickstarter/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 14:00:30 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Signal]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=505</guid>
		<description><![CDATA[Group-financing for art projects. And, most of them have a cool reward for different levels of support! Here are the projects I'm backing to get started. If they all get funded, I'll get the following rewards: Thank-You card and i3 Detroit sticker Handmade postcard Exclusive Akimenko Meats Cookbook Between this and my Kiva loans, I [...]]]></description>
			<content:encoded><![CDATA[<p>Group-financing for art projects. And, most of them have a cool reward for different levels of support! <a href="http://www.kickstarter.com/profile/158200699">Here are the projects I'm backing to get started.</a> If they all get funded, I'll get the following rewards:</p>
<ul>
<li>Thank-You card and i3 Detroit sticker</li>
<li>Handmade postcard</li>
<li>Exclusive Akimenko Meats Cookbook</li>
</ul>
<p>Between this and <a href="http://www.kiva.org/lender/whoisgregg">my Kiva loans</a>, I think I'll always be able to put my disposable income to good use. :)</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/03/26/first-kiva-now-kickstarter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Excerpt vs. Full Content RSS Feeds</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/03/11/on-excerpt-vs-full-content-rss-feeds/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/03/11/on-excerpt-vs-full-content-rss-feeds/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 18:41:35 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=502</guid>
		<description><![CDATA[True wisdom from Marco Arment this week: We don’t deserve anything. Publishers can do whatever they want. If you don’t like it, don’t send them nasty emails or browse their sites with ad-blockers: just don’t support them. Don’t read their content, don’t link to them, and don’t talk about them. Since money’s not usually involved, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.marco.org/438103070">True wisdom</a> from Marco Arment this week:</p>
<blockquote><p>We don’t deserve anything. Publishers can do whatever they want. If you don’t like it, don’t send them nasty emails or browse their sites with ad-blockers: just don’t support them. Don’t read their content, don’t link to them, and don’t talk about them. Since money’s not usually involved, vote with your attention and read elsewhere.</p></blockquote>
<p><a href="http://www.kungfugrippe.com/post/439434786/entitled-to-care">Merlin Mann tries to respond to it</a>, but instead responds to everyone else's arguments about why full feeds are better. But, I guess if you call something a straw man, the only way you "win" is by attacking some other position. What gets me though is this curiously stalker-ish final paragraph:</p>
<blockquote><p>(I’d also mention, just in passing, Marco, that your two primary businesses I’m aware of rely very heavily on all that expensive content being freely available and munge-able. A magazine article that can’t be reblogged will never make it onto Tumblr, and a more (theoretically) monetizable world of teaser-only websites and feeds turns Instapaper into a beautifully-implemented PR aggregator)</p></blockquote>
<p>Ad hominem, Merlin.</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/03/11/on-excerpt-vs-full-content-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New From Google: LessTraffic™</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/01/22/new-from-google-less-traffic/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/01/22/new-from-google-less-traffic/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 20:25:54 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Signal]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=483</guid>
		<description><![CDATA[From the Google Blog: Answer highlighting in search results Consider the example, [empire state height]. With today's improvements, the answer —1250 ft, or 381 m — is highlighted right in the search result: This might be cool for Wikipedia, but it totally screws every other website owner. If you have a website that deals with [...]]]></description>
			<content:encoded><![CDATA[<p>From the <a href="http://googleblog.blogspot.com/2010/01/understanding-web-to-make-search-more.html">Google Blog</a>:</p>
<blockquote>
<p><strong>Answer highlighting in search results</strong></p>
<p>Consider the example, [empire state height]. With today's improvements, the answer —1250 ft, or 381 m — is highlighted right in the search result:</p>
<p><img class="alignnone size-full wp-image-484" title="Google Answer Highlighting" src="http://www.whoisgregg.com/blog/wp-content/uploads/2010/01/rs2.png" alt="Google Answer Highlighting" width="555" height="88" /></p></blockquote>
<p>This <em>might</em> be cool for Wikipedia, but it <em>totally screws</em> every other website owner.</p>
<p>If you have a website that deals with anything Google's algorithm has decided is a "fact" then watch out, your traffic is about to drop. Google's destroyed a lot of niche online markets but this is a broad attack against all sites.</p>
<p>The future of this feature is that you never have to leave Google at all.</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/01/22/new-from-google-less-traffic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finally.</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/01/12/finally/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/01/12/finally/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 23:23:46 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=480</guid>
		<description><![CDATA[From Google: We have decided we are no longer willing to continue censoring our results on Google.cn, and so over the next few weeks we will be discussing with the Chinese government the basis on which we could operate an unfiltered search engine within the law, if at all. We recognize that this may well [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://googleblog.blogspot.com/2010/01/new-approach-to-china.html">From Google</a>:</p>
<blockquote><p> We have decided we are no longer willing to continue censoring our results on Google.cn, and so over the next few weeks we will be discussing with the Chinese government the basis on which we could operate an unfiltered search engine within the law, if at all. We recognize that this may well mean having to shut down Google.cn, and potentially our offices in China.</p></blockquote>
<p>It's about time.</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/01/12/finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Micro-Lending to Change the World</title>
		<link>http://www.whoisgregg.com/blog/blog/2010/01/02/micro-lending-to-change-the-world/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2010/01/02/micro-lending-to-change-the-world/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 23:33:32 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Signal]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=472</guid>
		<description><![CDATA[Back in January I helped make a loan to Nosirova Uguljon so that she could buy a greater range of goods for her childrens' clothing business. Nosirova's business is in Kanibadam, Tajikistan. (Tajikistan is the poorest of the former Soviet republics.) Her daughter helps with the business: Entrepreneurs like Nosirova are the key to building the [...]]]></description>
			<content:encoded><![CDATA[<p>Back in January I helped make <a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=86044">a loan to Nosirova Uguljon</a> so that she could buy a greater range of goods for her childrens' clothing business. Nosirova's business is in Kanibadam, Tajikistan. (Tajikistan is the poorest of the former Soviet republics.) Her daughter helps with the business:</p>
<div id="attachment_471" class="wp-caption aligncenter" style="width: 460px"><a rel="attachment wp-att-471" href="http://www.whoisgregg.com/blog/2010/01/micro-lending-to-change-the-world.html/attachment/262236"><img class="size-full wp-image-471 " title="Nosirova Uguljon's Daughter" src="http://www.whoisgregg.com/blog/wp-content/uploads/2010/01/262236.jpg" alt="Nosirova Uguljon's Daughter" width="450" height="338" /></a><p class="wp-caption-text">Nosirova Uguljon&#39;s Daughter</p></div>
<p>Entrepreneurs like Nosirova are the key to building the economy in poverty stricken areas like Tajikistan. Plus, her daughter represents a better future for their family and community. Although the total loan amount was $1,200, it only took $25 of my money to help support this business. I was able to join with 37 other lenders to support Nosirova's business through the microfinance site, <a href="http://www.kiva.org/"><strong>Kiva</strong></a>.</p>
<div id="attachment_473" class="wp-caption alignright" style="width: 236px"><a rel="attachment wp-att-473" href="http://www.whoisgregg.com/blog/2010/01/micro-lending-to-change-the-world.html/attachment/430236"><img class="size-full wp-image-473" title="Alice Indangasi Shabola" src="http://www.whoisgregg.com/blog/wp-content/uploads/2010/01/430236.jpg" alt="Alice Indangasi Shabola" width="226" height="127" /></a><p class="wp-caption-text">Alice Indangasi Shabola</p></div>
<p>She's already paid back her loan and I've turned around the $25 and loaned it to <a href="http://www.kiva.org/app.php?page=businesses&amp;action=about&amp;id=155078">Alice Indangasi Shabola for her clothing business in Kenya</a>. That $25 now represents <em>$50 of economic impact</em> to businesses in developing countries. When Alice pays back her loan, I'll loan that money out again to yet another business. You can see what kind of long-term effect just $25 can have on Kiva.</p>
<p>Of course, once you've made one loan, you want to make more. :) Here's <a href="http://www.kiva.org/lender/whoisgregg">my lending page on Kiva showing all the loans I've made</a>.</p>
<p><strong>I hope you'll find $25 to loan through Kiva and have a real impact decreasing poverty around the world.</strong></p>
<div style="text-align: center; margin: 0 auto;"><script src="http://www.kiva.org/banners/bannerBlock.php" type="text/javascript"></script></div>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2010/01/02/micro-lending-to-change-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>expandUrl Passes 11,000 Mark (at Least)</title>
		<link>http://www.whoisgregg.com/blog/blog/2009/12/04/expandurl-passes-11000-mark-at-least/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2009/12/04/expandurl-passes-11000-mark-at-least/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 20:27:48 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[Signal]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Webmaster]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=464</guid>
		<description><![CDATA[Since announcing the launch of expandUrl and fixing the few bugs that cropped up in the first week or so, I have barely given the service a second thought. The API works incredibly well for my own sites which take advantage of it. Today, after receiving a report that the service was unavailable last night, [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://www.whoisgregg.com/blog/2009/04/introducing-expandurl-redirect-resolution-for-the-rest-of-us.html">announcing the launch of expandUrl</a> and fixing the few bugs that cropped up in the first week or so, I have barely given the service a second thought. The API works incredibly well for my own sites which take advantage of it.</p>
<p>Today, after receiving a report that the service was unavailable last night, I took another look at it. Still not sure why it went down, but while I was working on it I've added some basic logging (for troubleshooting purposes) and looked around the internet to see if people are using the service.</p>
<p>Since logging was never included in the first place, the only way to surface a reasonable count of URLs was to count the cache files. Since cache files are programatically deleted, I was pretty shocked to find over 11,000 files in that directory. Now that I have actually logging in place, the site displays a counter. Today's count? <strong>11,411 URLs expanded!</strong></p>
<p>Of course, people only know about the service because of the folks who have helped spread the word about it! Thank you to all these folks for mentioning expandUrl:</p>
<ul>
<li><a href="http://blog.brasilacademico.com/2009/10/como-expandir-links-no-twitter.html">Blog Brasil Academico</a> "If you prefer a cleaner and more free advertising try expandurl.com."</li>
<li><a href="http://twitter.com/troysabin/status/1865495529">Troy Sabin</a> "The Yang to the URL shortener Yin - URL expanders"</li>
<li><a href="http://freenuts.com/top-10-websites-to-expand-any-short-url/">Free Nuts</a> #2 in their top ten URL expanders list!</li>
<li><a href="http://borrowedcode.com/?p=158">Borrowed Code</a> Mentioned as part of a blog entry about fighting Twitter spam.</li>
<li><a href="http://mrhaoji.cn/blog/?p=408">Benny Chen</a> "<span style="background-color: #ffffff;" title="????????????,???????????????????;">After failing to find a good solution, a short address before the humble beginning to run out to restore the service; </span><span style="background-color: #ffffff;" title="??????????????!">Can only say that a group of prescient people, ah!</span>"</li>
<li><a href="http://blog.nullvariable.com/2009/11/do-you-know-where-that-short-link-goes/#dsq-comment-23961509">Kate Morris</a> "There is another useful tool available - http://www.expandurl.com - it shows you not only where it goes, but how many times it is redirected and how. :) Not my tool, but a friend built it."</li>
</ul>
<p>Finally, I discovered a Google Code project that <a href="http://code.google.com/p/ellab-gm/source/detail?r=170">integrates the expandurl API</a> into Google Chrome. This is very cool to me, as it means the service will be used by lots of folks (even if they don't know they're using it!). :)</p>
<p>Not too shabby for 221 days in. ;)</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2009/12/04/expandurl-passes-11000-mark-at-least/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Lessn to Track Statistics</title>
		<link>http://www.whoisgregg.com/blog/blog/2009/08/31/hacking-lessn-to-track-statistics/</link>
		<comments>http://www.whoisgregg.com/blog/blog/2009/08/31/hacking-lessn-to-track-statistics/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 17:31:28 +0000</pubDate>
		<dc:creator>Gregg Hilferding</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.whoisgregg.com/blog/?p=456</guid>
		<description><![CDATA[When Shaun Inman shared his URL shortening PHP script Lessn, I was pretty excited. Right now I use kl.am, a free service from Raven SEO Tools, for all my URL shortening needs. It's awesome and 99.5% perfect. But I've really wanted to host my own for three reasons: I want bulk uploads with custom short [...]]]></description>
			<content:encoded><![CDATA[<p>When <a href="http://shaun.in/man/">Shaun Inman</a> shared his <a href="http://www.shauninman.com/archive/2009/08/17/less_n">URL shortening PHP script Lessn</a>, I was pretty excited.</p>
<p>Right now I use <a href="http://kl.am/">kl.am</a>, a free service from <a href="http://raven-seo-tools.com/">Raven SEO Tools</a>, for all my URL shortening needs. It's awesome and 99.5% perfect. But I've really wanted to host my own for three reasons:</p>
<ol>
<li>I want bulk uploads with custom short URLs so I can have predictable, product SKU short URLs.</li>
<li>I want to be able to repoint a short URL if it's old URL changes or 404s.</li>
<li>I don't want to compete with other users for custom URLs.</li>
</ol>
<p>Unfortunately, rolling my own will mean I miss out on all the amazing coolness of kl.am. Mine wouldn't be as slick or easy to use. However, Lessn is slick and easy to use. But it doesn't do custom URLs and it doesn't track how often people visit a short URL. So I added those features.</p>
<h3>Tracking clicks</h3>
<p>In the file /-/db.php, add this statement to create a second table:</p>
<blockquote><p><code>mysql_query('CREATE TABLE IF NOT EXISTS `'.DB_PREFIX.'stats` ( '.<br />
	'`id` int(11) unsigned NOT NULL auto_increment, '. <br />
	'`url_id` int(11) unsigned NOT NULL, '. <br />
	'`ts` datetime NOT NULL, '. <br />
	'`ua` text character set utf8 collate utf8_unicode_ci NOT NULL, '. <br />
	'`ref` text character set utf8 collate utf8_unicode_ci NOT NULL, '. <br />
	'`ip` int(4) unsigned NOT NULL, '. <br />
	'PRIMARY KEY  (`id`), '. <br />
	'KEY `url_id` (`url_id`) '. <br />
	') ENGINE=MyISAM DEFAULT CHARSET=utf8;');</code></p></blockquote>
<p>Then, in the /index.php file, add this line right after the header('Location:'); line:</p>
<blockquote><p><code>mysql_query("INSERT INTO `".DB_PREFIX."stats` SET `url_id`='".$row['id']."', `ts`='".date("Y-m-d H:i:s")."', `ua`='".mysql_real_escape_string($_SERVER['HTTP_USER_AGENT'])."', `ref`='".mysql_real_escape_string($_SERVER['HTTP_REFERER'])."', `ip`='".sprintf("%u", ip2long($_SERVER['REMOTE_ADDR']))."' ");</code></p></blockquote>
<p>To test, go visit one of your short URLs, and then go check the stats table. You should see a new entry in the table.</p>
<p>Now, how you choose to display the data from this table is up to you. :)</p>
<hr/>Copyright &copy; 2012 <strong><a href="http://www.whoisgregg.com/blog">Gregg Hilferding</a></strong>. This feed is for personal non-commercial use only.]]></content:encoded>
			<wfw:commentRss>http://www.whoisgregg.com/blog/blog/2009/08/31/hacking-lessn-to-track-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

