<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>longurlplease &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/longurlplease/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Mon, 08 Sep 2025 08:13:15 +0000</lastBuildDate>
	<language>en-GB</language>
	<copyright>© Terence Eden. 🄯 CC BY-SA. See https://shkspr.mobi/blog/copyright-and-copyleft/</copyright>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>longurlplease &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Expanding URLs in Dabr / Twitter]]></title>
		<link>https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/</link>
					<comments>https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Tue, 08 Sep 2009 11:46:55 +0000</pubDate>
		<category><![CDATA[bit.ly]]></category><category><![CDATA[dabr]]></category><category><![CDATA[longurlplease]]></category><category><![CDATA[twitter]]></category><category><![CDATA[url]]></category>		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=461</guid>

					<description><![CDATA[I hate shortened URLs with a passion.  It makes it hard to see what a link is and whether I&#039;ve visited it before.  If they fail - like tr.im threatened to do - you lose your links with no way to see where they once went.  So, hurrah for LongURLPlease - a service which takes those horrid little links and turns them in to full sized URLs.  Here&#039;s the basic code in PHP to use the service.  function l…]]></description>
										<content:encoded>&lt;p&gt;I hate shortened URLs with a passion.&amp;nbsp; It makes it hard to see what a link is and whether I've visited it before.&amp;nbsp; If they fail - &lt;a href="https://web.archive.org/web/20090815224130/http://blog.tr.im:80/post/159369789/tr-im-r-i-p"&gt;like tr.im threatened to do&lt;/a&gt; - you lose your links with no way to see where they once went.&lt;/p&gt;

&lt;p&gt;So, hurrah for &lt;a href="https://web.archive.org/web/20090912162632/http://www.longurlplease.com/"&gt;LongURLPlease&lt;/a&gt; - a service which takes those horrid little links and turns them in to full sized URLs.&lt;/p&gt;

&lt;p&gt;Here's the basic code in PHP to use the service.&lt;/p&gt;

&lt;pre&gt;function long_url($shortURL)
{
 //Use the LongURLPlease API
 $url = "http://www.longurlplease.com/api/v1.1?q=" . $shortURL;

 //Set up CURL
 $curl_handle=curl_init();
 curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
 curl_setopt($curl_handle,CURLOPT_URL,$url);

 //Get the JSON response
 $url_json = curl_exec($curl_handle);

 //Close the connection
 curl_close($curl_handle);

 //Decode the JSON
 $url_array = json_decode($url_json,true);

 //Get the Long URL out of the array
 $url_long = $url_array["$shortURL"];

 if ($url_long == null) //The service couldn't find a long URL
 {
 return $shortURL;
 }

 return $url_long;
}
&lt;/pre&gt;

&lt;p&gt;So, how should this be displayed to the user in Dabr?&lt;/p&gt;

&lt;p&gt;There are three possibilities.&lt;/p&gt;

&lt;h2 id="display"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#display"&gt;Display&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href="short.url/foo"&amp;gt;VeryVeryLong.Url/Bar&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This keeps the redirect, but it displays the full URL for the user.&lt;/p&gt;

&lt;h3 id="pros"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#pros"&gt;Pros.&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Get to see what the content is.&lt;/li&gt;
    &lt;li&gt;Allows the short URL service to record hits etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id="cons"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#cons"&gt;Cons.&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Won't highlight if you've already visited it.&lt;/li&gt;
    &lt;li&gt;May cause problems if the VeryLong.Url is too long for the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="all-change"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#all-change"&gt;All Change&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href="VeryVeryLong.Url/Bar"&amp;gt;VeryVeryLong.Url/Bar&amp;lt;/a&amp;gt;&lt;/code&gt;
This completely replaces the short URL.&lt;/p&gt;

&lt;h3 id="pros"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#pros"&gt;Pros.&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Hurrah! No more silly URLs.&lt;/li&gt;
    &lt;li&gt;Will highlight if you've already visited it.&lt;/li&gt;
    &lt;li&gt;You can seen what you're about to click on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id="cons"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#cons"&gt;Cons.&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Breaks any statistics management the short URL service was performing (is this a con? Surely the receiving website should be recording such details?)&lt;/li&gt;
    &lt;li&gt;May cause problems if the VeryLong.Url is too long for the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="background"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#background"&gt;Background&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href="VeryVeryLong.Url/Bar"&amp;gt;short.url/foo&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3 id="pros"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#pros"&gt;Pros.&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Will highlight if you've already visited it.&lt;/li&gt;
    &lt;li&gt;You can seen what you're about to click on if you hover over the URL.&lt;/li&gt;
    &lt;li&gt;Won't cause problems if the URL is too long for the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id="cons"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#cons"&gt;Cons.&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Breaks any statistics management the short URL service was performing (is this a con? Surely the receiving website should be recording such details?)&lt;/li&gt;
    &lt;li&gt;User can't immediately see what they're about to click on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="conclusions"&gt;&lt;a href="https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/#conclusions"&gt;Conclusions&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;I prefer replacing the URL completely.&amp;nbsp; I see no value in the various short URL services.&amp;nbsp; The stats that they gather don't seem any better that those your webserver can provide.&lt;/p&gt;

&lt;p&gt;However, long URLs can be messy - especially on small screened devices.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div id="attachment_467-2" style="width: 490px" class="wp-caption aligncenter"&gt;&lt;img aria-describedby="caption-attachment-467-2" class="size-full wp-image-467" title="Capture12_17_3" src="https://shkspr.mobi/blog/wp-content/uploads/2009/09/Capture12_17_3.jpg" alt="Long URLs on a BlackBerry" width="480" height="320"&gt;&lt;p id="caption-attachment-467-2" class="wp-caption-text"&gt;Long URLs on a BlackBerry&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;

&lt;p&gt;So, which do you prefer?&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=461&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2009/09/expanding-urls-in-dabr-twitter/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
