<?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>tech stuff &#187; tinyurl</title>
	<atom:link href="http://codytaylor.org/tag/tinyurl/feed" rel="self" type="application/rss+xml" />
	<link>http://codytaylor.org</link>
	<description>From Cody Taylor.</description>
	<lastBuildDate>Sun, 30 Oct 2011 04:15:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Generate A Tiny URL On The Fly With PHP</title>
		<link>http://codytaylor.org/2009/06/generate-a-tiny-url-on-the-fly-with-php.html</link>
		<comments>http://codytaylor.org/2009/06/generate-a-tiny-url-on-the-fly-with-php.html#comments</comments>
		<pubDate>Thu, 18 Jun 2009 02:07:08 +0000</pubDate>
		<dc:creator>Cody Taylor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[problems and solutions]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tinyurl]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://codytaylor.org/?p=14140</guid>
		<description><![CDATA[Uniform resource locators (URL) are starting to get very long and I&#8217;m getting sick of typing ridiculously long strings into safari on my iphone. I don&#8217;t really care about the extra bandwidth, It&#8217;s just annoying when you&#8217;re on the phone telling someone to go check out a 67 character long url and they mistype it [...]]]></description>
			<content:encoded><![CDATA[<p>Uniform resource locators (URL) are starting to get very long and I&#8217;m getting sick of typing ridiculously long strings into safari on my iphone. I don&#8217;t really care about the extra bandwidth, It&#8217;s just annoying when you&#8217;re on the phone telling someone to go check out a 67 character long url and they mistype it three times. </p>
<p>I&#8217;ve just started using the tiny url service and so far it&#8217;s been useful. On one of my sites I wanted to generate a tiny url for each of my pages to make them quicker to type in and also so people don&#8217;t know what get variables I&#8217;ve set until they get there. Here is the PHP function that I used to generate a tiny url for every page on the site. </p>
<p>There doesn&#8217;t seem to be any documentation at all on the Tiny URL website about this so I&#8217;m not sure if it&#8217;ll change in the future.<br />
This function passes your desired url to the api-create.php script on the tinyurl domain which returns a nice short url that isn&#8217;t a pain to put into your iphone.<br />
<pre><code>
function get_tiny_url($url)
{
&nbsp;&nbsp;$new_url = file_get_contents(&#039;http://tinyurl.com/api-create.php?url=&#039;.$url);
&nbsp;&nbsp;return $new_url;
}

$tiny_url = get_tiny_url(&quot;http://codytaylor.org&quot;);
</code></pre><br />
Not much to it but it made my life easier.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fcodytaylor.org%2F2009%2F06%2Fgenerate-a-tiny-url-on-the-fly-with-php.html&amp;linkname=Generate%20A%20Tiny%20URL%20On%20The%20Fly%20With%20PHP"><img src="http://codytaylor.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://codytaylor.org/2009/06/generate-a-tiny-url-on-the-fly-with-php.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

