<?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>HM2K.com &#187; Internet</title>
	<atom:link href="http://www.hm2k.com/posts/category/internet/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hm2k.com</link>
	<description>The research of an internet entrepreneur and IT consultant</description>
	<lastBuildDate>Wed, 30 Jun 2010 09:29:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WhoisX relaunch</title>
		<link>http://www.hm2k.com/posts/whoisx-relaunch</link>
		<comments>http://www.hm2k.com/posts/whoisx-relaunch#comments</comments>
		<pubDate>Fri, 04 Jun 2010 10:08:07 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Domains]]></category>
		<category><![CDATA[relaunch]]></category>
		<category><![CDATA[whois]]></category>
		<category><![CDATA[whoisx]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=629</guid>
		<description><![CDATA[We&#8217;re ready now&#8230;
So, we&#8217;ve been running WhoisX since 2004, it was slightly updated in 2007, since then not a lot has happened&#8230;
Until now&#8230;
We&#8217;ve spent the past few weeks putting together some plans and developing them into a brand new site, which we hope you&#8217;ll like.
Now for the good stuff&#8230;
To get started, simply visit our website:

http://whoisx.co.uk/

So, [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/twitter-for-mirc' rel='bookmark' title='Permanent Link: Twitter for mIRC'>Twitter for mIRC</a> <small>I signed up for Twitter quite some months ago, but...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h1>We&#8217;re ready now&#8230;</h1>
<p>So, we&#8217;ve been running <a href="http://whoisx.co.uk/">WhoisX</a> since 2004, it was slightly updated in 2007, since then not a lot has happened&#8230;</p>
<p>Until now&#8230;<br />
<span id="more-629"></span>We&#8217;ve spent the past few weeks putting together some plans and developing them into a brand new site, which we hope you&#8217;ll like.</p>
<p>Now for the good stuff&#8230;</p>
<p>To get started, simply visit our website:</p>
<ul>
<li><a href="http://whoisx.us1.list-manage.com/track/click?u=fc3257c084746eaaba754914a&amp;id=54b2fab19a&amp;e=3891362231">http://whoisx.co.uk/</a></li>
</ul>
<p>So, what are you waiting for? Let&#8217;s go!</p>
<p>We hope you like what we&#8217;ve done, but I&#8217;m sure you will have something to say, so we&#8217;ve made it really easy for you to give us feedback, just look for the link on the website.</p>
<p>Ps. You&#8217;ll also find us on twitter <a href="http://whoisx.us1.list-manage.com/track/click?u=fc3257c084746eaaba754914a&amp;id=cd2b64458c&amp;e=3891362231">@whoisxuk</a>.</p>
<p>Thanks!</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/twitter-for-mirc' rel='bookmark' title='Permanent Link: Twitter for mIRC'>Twitter for mIRC</a> <small>I signed up for Twitter quite some months ago, but...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/whoisx-relaunch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Universal Currency Converter TCL for Eggdrop</title>
		<link>http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop</link>
		<comments>http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop#comments</comments>
		<pubDate>Thu, 25 Feb 2010 14:41:31 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[converter]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[eggdrop]]></category>
		<category><![CDATA[TCL]]></category>
		<category><![CDATA[ucc]]></category>
		<category><![CDATA[xe.com]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=602</guid>
		<description><![CDATA[This is a currency converter written in TCL for Eggdrop, which is similar to the ucc.mrc I wrote for mIRC.
I used to use the xeucc.tcl, but that script no longer works and hasn&#8217;t been updated since 2008.
&#62; !ucc 9 usd gbp
&#60;Bot&#62; Could not obtain results from XE.com, sorry!
Further more xeucc.tcl uses the XE.com website to [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/weather-tcl' rel='bookmark' title='Permanent Link: weather.tcl'>weather.tcl</a> <small>Today, after I decided to hang out in #eggtcl on...</small></li>
<li><a href='http://www.hm2k.com/posts/worldtime-tcl' rel='bookmark' title='Permanent Link: worldtime.tcl'>worldtime.tcl</a> <small>Sometimes you need to know the time somewhere else in...</small></li>
<li><a href='http://www.hm2k.com/posts/tinysong-tcl-script-for-eggdrop' rel='bookmark' title='Permanent Link: TinySong TCL script for Eggdrop'>TinySong TCL script for Eggdrop</a> <small>If you&#8217;ve not heard of TinySong, you&#8217;re missing out! TinySong...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is a currency converter written in TCL for Eggdrop, which is similar to the ucc.mrc I wrote for mIRC.</p>
<p>I used to use the <a href="http://members.dandy.net/~fbn/xeucc.tcl.txt">xeucc.tcl</a>, but that script no longer works and hasn&#8217;t been updated since 2008.</p>
<blockquote><p>&gt; !ucc 9 usd gbp<br />
&lt;Bot&gt; Could not obtain results from XE.com, sorry!</p></blockquote>
<p><span id="more-602"></span>Further more xeucc.tcl uses the XE.com website to gather the information, however they don&#8217;t like us doing this, and have since added the following message:</p>
<blockquote><p>WARNING: Automated extraction of rates is prohibited under the Terms of Use.</p></blockquote>
<p>Other scripts such as Incith&#8217;s Exchange also use a website. This one uses Yahoo Finance. The problem is that this website is subject to change at any time without prior notice.</p>
<p>Parsing a website that is subject to change is not always a good idea. Instead what is needed is an API which is easy to parse and extract the data and also unlikely to change formatting.</p>
<p>Although XE.com does have an API, it is not free. This is no good.</p>
<p>I have decided instead to use the <a href="http://developer.yahoo.com/">Yahoo Developer Network</a> Currency Converter API, which is much easier to parse and permits this kind of usage.</p>
<p>There is a choice of two URLs which you can call to get the data:</p>
<blockquote><p><a href="http://finance.yahoo.com/d/quotes.csv?e=.csv&amp;f=sl1d1t1&amp;s=USDGBP=X">http://finance.yahoo.com/d/quotes.csv?e=.csv&amp;f=sl1d1t1&amp;s=USDGBP=X</a></p>
<p><a href="http://download.finance.yahoo.com/d/?f=sl1d1t1&amp;s=USDGBP=X">http://download.finance.yahoo.com/d/?f=sl1d1t1&amp;s=USDGBP=X</a></p></blockquote>
<p>Both examples should provide you with a csv file to download which will contain the currency information.</p>
<p>I have used the second URL in my script.</p>
<p><strong>Usage</strong></p>
<blockquote><p>&gt; .ucc<br />
&lt;Bot&gt; Usage: .ucc &lt;amount&gt; &lt;from&gt; &lt;to&gt;<br />
&gt; .ucc 9 usd gbp<br />
&lt;Bot&gt; HM2K, * UCC: 9 USD is 5.8905 GBP as of 2/25/2010 9:22am</p></blockquote>
<p><strong>Download</strong></p>
<ul>
<li>Download <a href="http://hm2k.googlecode.com/svn/trunk/code/tcl/ucc.tcl">ucc.tcl</a></li>
</ul>
<p>If you like it, or even if you don&#8217;t, please leave a comment below. Thanks.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/weather-tcl' rel='bookmark' title='Permanent Link: weather.tcl'>weather.tcl</a> <small>Today, after I decided to hang out in #eggtcl on...</small></li>
<li><a href='http://www.hm2k.com/posts/worldtime-tcl' rel='bookmark' title='Permanent Link: worldtime.tcl'>worldtime.tcl</a> <small>Sometimes you need to know the time somewhere else in...</small></li>
<li><a href='http://www.hm2k.com/posts/tinysong-tcl-script-for-eggdrop' rel='bookmark' title='Permanent Link: TinySong TCL script for Eggdrop'>TinySong TCL script for Eggdrop</a> <small>If you&#8217;ve not heard of TinySong, you&#8217;re missing out! TinySong...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>worldtime.tcl</title>
		<link>http://www.hm2k.com/posts/worldtime-tcl</link>
		<comments>http://www.hm2k.com/posts/worldtime-tcl#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:04:23 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[eggdrop]]></category>
		<category><![CDATA[TCL]]></category>
		<category><![CDATA[timezones]]></category>
		<category><![CDATA[worldtime]]></category>
		<category><![CDATA[zoneinfo]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=573</guid>
		<description><![CDATA[Sometimes you need to know the time somewhere else in the world. I find it useful to get my eggdrop to return the time of another timezone&#8230;

&#62; .tz london
&#60;Bot&#62; HM2K, The time for the london timezone is Fri Feb 13 23:31:30 2009

However, much like my old weather.tcl, I realised that my worldtime.tcl had passed it&#8217;s [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop' rel='bookmark' title='Permanent Link: Universal Currency Converter TCL for Eggdrop'>Universal Currency Converter TCL for Eggdrop</a> <small>This is a currency converter written in TCL for Eggdrop,...</small></li>
<li><a href='http://www.hm2k.com/posts/weather-tcl' rel='bookmark' title='Permanent Link: weather.tcl'>weather.tcl</a> <small>Today, after I decided to hang out in #eggtcl on...</small></li>
<li><a href='http://www.hm2k.com/posts/which-is-the-best-operating-system' rel='bookmark' title='Permanent Link: Which is the best operating system?'>Which is the best operating system?</a> <small>I&#8217;ve done my research and i&#8217;ve discovered there&#8217;s only 6...</small></li>
<li><a href='http://www.hm2k.com/posts/eticket' rel='bookmark' title='Permanent Link: eTicket'>eTicket</a> <small>For the past few weeks I have been mostly working...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to know the time somewhere else in the world. I find it useful to get my eggdrop to return the time of another timezone&#8230;</p>
<blockquote>
<pre>&gt; .tz london
&lt;Bot&gt; HM2K, The time for the london timezone is Fri Feb 13 23:31:30 2009</pre>
</blockquote>
<p>However, much like my old <em>weather.tcl</em>, I realised that my <em>worldtime.tcl</em> had passed it&#8217;s sell by date and had now expired.</p>
<p>My old <em>worldtime.tcl</em> which was based on a script by <em>Murf</em> which used <em>worldtimeserver.com</em> to gather it&#8217;s data had stopped working.</p>
<p>It would seem that <em>worldtimeserver.com</em> had changed their markup which meant that it was no longer possible to parse the correct data from the HTML.</p>
<p>Never mind, I thought, there must be a better way, that doesn&#8217;t need to use a third party website, that won&#8217;t stop working.</p>
<p>After all operating systems have worldtime build in without using a website, so how do they do it?</p>
<p>So, I did some investigation&#8230;</p>
<p><span id="more-573"></span></p>
<p><span style="text-decoration: line-through;">I discovered that on Linux based systems (including FreeBSD) the time zone information was stored locally.</span></p>
<blockquote><p><span style="text-decoration: line-through;">/usr/share/zoneinfo/</span></p></blockquote>
<p><span style="text-decoration: line-through;">Using a bit of Google magic, I managed to locate a few pre-made procedures to help me read the time zone information.</span></p>
<ul>
<li><span style="text-decoration: line-through;"><a href="http://alice.wu-wien.ac.at:8000/xowiki/load-timezones.tcl">load-timezones.tcl</a></span>
<ul>
<li><span style="text-decoration: line-through;">get_tz_names</span></li>
<li><span style="text-decoration: line-through;">get_tz_rules</span></li>
</ul>
</li>
</ul>
<p><span style="text-decoration: line-through;">Using these functions I was able to find the right timezone and get the GMT offset which allowed me to work out the time in that timezone using the unix ticks.</span></p>
<p><span style="text-decoration: line-through;">At the moment, because it reads the time zone files that are only available on Linux based systems, it will not work on windrops.</span></p>
<p><span style="text-decoration: line-through;">However, what I may do next time is build a function that saves the timezone information into a database file which can be used on windows systems and will also give the Linux systems a cache file to make it respond quicker.</span></p>
<p><strong>Update: </strong>I decided to stop using the tz database method and replace it with a Google lookup method, which is far more accurate and portable.</p>
<p>So now you&#8217;ll probably want to download it&#8230;</p>
<ul>
<li><a href="http://hm2k.googlecode.com/svn/trunk/code/tcl/worldtime.tcl">Download worldtime.tcl</a></li>
</ul>
<p>Hope it works for you.</p>
<p>Enjoy!</p>
<p>Note: If you find this useful, or have an issue with the script, please add a comment below. Thanks.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop' rel='bookmark' title='Permanent Link: Universal Currency Converter TCL for Eggdrop'>Universal Currency Converter TCL for Eggdrop</a> <small>This is a currency converter written in TCL for Eggdrop,...</small></li>
<li><a href='http://www.hm2k.com/posts/weather-tcl' rel='bookmark' title='Permanent Link: weather.tcl'>weather.tcl</a> <small>Today, after I decided to hang out in #eggtcl on...</small></li>
<li><a href='http://www.hm2k.com/posts/which-is-the-best-operating-system' rel='bookmark' title='Permanent Link: Which is the best operating system?'>Which is the best operating system?</a> <small>I&#8217;ve done my research and i&#8217;ve discovered there&#8217;s only 6...</small></li>
<li><a href='http://www.hm2k.com/posts/eticket' rel='bookmark' title='Permanent Link: eTicket'>eTicket</a> <small>For the past few weeks I have been mostly working...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/worldtime-tcl/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Gmail needs an API</title>
		<link>http://www.hm2k.com/posts/gmail-needs-an-api</link>
		<comments>http://www.hm2k.com/posts/gmail-needs-an-api#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:05:06 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google mail]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=570</guid>
		<description><![CDATA[Yesterday I spent some time investigating Google Wave. A very interesting new product from Google. Not only that but an interesting protocol.
If you think about it, Google has mostly only used other protocols for communication in the past, now it&#8217;s creating it&#8217;s own. They clearly want to create a completely new protocol that will effectively [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/how-not-to-use-phpmailer' rel='bookmark' title='Permanent Link: How not to use PHPMailer'>How not to use PHPMailer</a> <small>I came across PHPMailer usage the other day on a...</small></li>
<li><a href='http://www.hm2k.com/posts/google-adsense-wont-let-me-in' rel='bookmark' title='Permanent Link: Google AdSense won&#8217;t let me in!'>Google AdSense won&#8217;t let me in!</a> <small>Back in 2004, I signed up my old site &#8220;hm2k.org&#8221;...</small></li>
<li><a href='http://www.hm2k.com/posts/hacked-my-school' rel='bookmark' title='Permanent Link: How I hacked my schools website &#8211; a look into the past'>How I hacked my schools website &#8211; a look into the past</a> <small>When I was about 16 I hacked my schools website,...</small></li>
<li><a href='http://www.hm2k.com/posts/how-to-setup-tucows-opensrs' rel='bookmark' title='Permanent Link: How to setup Tucows OpenSRS'>How to setup Tucows OpenSRS</a> <small>OpensSRS is a domain reseller system offered by Tucows to...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I spent some time investigating Google Wave. A very interesting new product from Google. Not only that but an interesting protocol.</p>
<p>If you think about it, Google has mostly only used other protocols for communication in the past, now it&#8217;s creating it&#8217;s own. They clearly want to create a completely new protocol that will effectively be the future of these old primitive protocols.</p>
<p>For this to catch on, it will either have to run directly along side smtp and xmmp or layer on top of them.</p>
<p>We&#8217;re going to need a way to pass requests over http to smtp or pop3/imap, and what better way to do it than with gmail?</p>
<p>Sure, but there&#8217;s no API&#8230;</p>
<p><span id="more-570"></span></p>
<p>It&#8217;s argued that all you need to do is roll your own &#8220;api&#8221; or library class to use smtp and imap server provided by Google Mail (gmail) to send and receive emails.</p>
<p>The problem with this is that you&#8217;re forced to hand the app your username and password. Naturally this raises security concerns.</p>
<p>Of course this isn&#8217;t a big problem if you only use your own username and password and manage to store it on your server security.</p>
<p>The problem comes when others want to use their gmail accounts with your web app. They have not choice but to hand over their username and password. What can possibly go wrong?</p>
<ul>
<li>Their username and password gives you FULL access to their account, including account actions such as changing passwords.</li>
</ul>
<p>My proposal would be for an API that allowed you to interface with gmail, in particular to send emails (which has the biggest scope here).</p>
<p>To access the API you could generate an API Key from within gmail that would allow you to interface with gmail, but limited to mailing functions, rather than account settings.</p>
<p>An alternative to this is similar to the &#8220;GoogleCode.com Password&#8221;, used by project members when checking out or committing source code changes, or when using command-line tools to upload files to the project &#8220;Downloads&#8221; tab.</p>
<p>If you could set a &#8220;Google Mail SMTP Password&#8221; or similar, which would only permit you to access the gmail SMTP server, but not gmail itself, this would also allow you to overcome the security issues mentioned above.</p>
<p>However, this alternative wouldn&#8217;t help towards integration with Google Wave as much as an api would.</p>
<p>In summary, to resolve the security issue an API is an option, but for Google Wave integration too, it&#8217;s essentially a must.</p>
<p>I hope someone at Google reads this and agrees with me, for that matter, I hope you or anyone reading this agrees with me.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/how-not-to-use-phpmailer' rel='bookmark' title='Permanent Link: How not to use PHPMailer'>How not to use PHPMailer</a> <small>I came across PHPMailer usage the other day on a...</small></li>
<li><a href='http://www.hm2k.com/posts/google-adsense-wont-let-me-in' rel='bookmark' title='Permanent Link: Google AdSense won&#8217;t let me in!'>Google AdSense won&#8217;t let me in!</a> <small>Back in 2004, I signed up my old site &#8220;hm2k.org&#8221;...</small></li>
<li><a href='http://www.hm2k.com/posts/hacked-my-school' rel='bookmark' title='Permanent Link: How I hacked my schools website &#8211; a look into the past'>How I hacked my schools website &#8211; a look into the past</a> <small>When I was about 16 I hacked my schools website,...</small></li>
<li><a href='http://www.hm2k.com/posts/how-to-setup-tucows-opensrs' rel='bookmark' title='Permanent Link: How to setup Tucows OpenSRS'>How to setup Tucows OpenSRS</a> <small>OpensSRS is a domain reseller system offered by Tucows to...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/gmail-needs-an-api/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>weather.tcl</title>
		<link>http://www.hm2k.com/posts/weather-tcl</link>
		<comments>http://www.hm2k.com/posts/weather-tcl#comments</comments>
		<pubDate>Thu, 05 Nov 2009 00:37:14 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[IRC]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[eggdrop]]></category>
		<category><![CDATA[eggtcl]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[TCL]]></category>
		<category><![CDATA[weather]]></category>
		<category><![CDATA[weather.tcl]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=560</guid>
		<description><![CDATA[Today, after I decided to hang out in #eggtcl on EFnet, someone asked the following:
&#60;daILLeST&#62; anyine know of a weather tcl that actually works? All the ones I find are outdated, or in another language&#8230;
I decided it was time that I updated my old weather.tcl based on a script by Ycarus for eggdrop bots.
Before, many [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/worldtime-tcl' rel='bookmark' title='Permanent Link: worldtime.tcl'>worldtime.tcl</a> <small>Sometimes you need to know the time somewhere else in...</small></li>
<li><a href='http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop' rel='bookmark' title='Permanent Link: Universal Currency Converter TCL for Eggdrop'>Universal Currency Converter TCL for Eggdrop</a> <small>This is a currency converter written in TCL for Eggdrop,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today, after I decided to hang out in #eggtcl on EFnet, someone asked the following:</p>
<blockquote><p>&lt;daILLeST&gt; anyine know of a weather tcl that actually works? All the ones I find are outdated, or in another language&#8230;</p></blockquote>
<p>I decided it was time that I updated my old weather.tcl based on a script by Ycarus for eggdrop bots.</p>
<p><span id="more-560"></span>Before, many scripts used weather underground (wunderground.com) to gather their feed.</p>
<p>I believe this is because there were many existing TCL based software that used this site to gather their data via telnet.</p>
<p>Telnet access to their server stopped working correctly, so scripts began using their http site to gather data. This too eventually stopped working as once they changed their site, the scripts could no longer parse the html for the data.</p>
<p>Enter Google.</p>
<p>Google has a weather API that they use for their &#8220;<a href="http://www.google.com/ig">iGoogle</a>&#8220;, which is very handy.</p>
<p>Although it appears to be undocumented by Google, working with the API is easy enough&#8230;</p>
<blockquote><p><a href="http://www.google.com/ig/api?weather=london&amp;hl=en">http://www.google.com/ig/api?weather=london&amp;hl=en</a></p></blockquote>
<p>The query string contains a &#8220;weather&#8221; parameter, which is generally city or postcode and the &#8220;hl&#8221; parameter which is the language.</p>
<p>This will return an XML formatted result for the city of &#8220;London, England&#8221;.</p>
<p>We can then parse the data we want from this and return it accordingly.</p>
<p>So, put it all together, a bit of TCL care (get it?), and we&#8217;re done&#8230;</p>
<ul>
<li>Download <a href="http://hm2k.googlecode.com/svn/trunk/code/tcl/weather.tcl">weather.tcl</a></li>
</ul>
<p>It works well, and returns a result similar to this:</p>
<blockquote><p>&gt; .wz london<br />
&lt;Bot&gt; HM2K, * Weather: London, England: Mostly Cloudy, 8ºC Humidity: 87% Wind: W at 9 mph</p></blockquote>
<p>Hope you find this useful.</p>
<p>What I may do next time&#8230;</p>
<p>Since Google&#8217;s Weather API is completely officially undocumented it&#8217;s worth noting that in future it may be wise to use <a href="http://developer.yahoo.com/weather/">Yahoo&#8217;s weather API</a>, which is fully and officially documented.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/worldtime-tcl' rel='bookmark' title='Permanent Link: worldtime.tcl'>worldtime.tcl</a> <small>Sometimes you need to know the time somewhere else in...</small></li>
<li><a href='http://www.hm2k.com/posts/universal-currency-converter-tcl-for-eggdrop' rel='bookmark' title='Permanent Link: Universal Currency Converter TCL for Eggdrop'>Universal Currency Converter TCL for Eggdrop</a> <small>This is a currency converter written in TCL for Eggdrop,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/weather-tcl/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>mydigitallife.info stole my code</title>
		<link>http://www.hm2k.com/posts/mydigitallife-info-stole-my-code</link>
		<comments>http://www.hm2k.com/posts/mydigitallife-info-stole-my-code#comments</comments>
		<pubDate>Wed, 14 Oct 2009 14:02:06 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[mydigitallife.info]]></category>
		<category><![CDATA[oga]]></category>
		<category><![CDATA[removeoga]]></category>
		<category><![CDATA[removeoga.bat]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=541</guid>
		<description><![CDATA[I wrote a little script for an article on fixr.co.uk entitled &#8220;Remove OGA Notifier&#8220;.
Today I discovered that mydigitallife.info had clearly taken details from my batch file code and used it without giving me or fixr.co.uk any credit at all.

Just compare the actual functions in my removeoga.bat to their RemoveOGA.bat, you can clearly see it&#8217;s the [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/tech-support-blog' rel='bookmark' title='Permanent Link: Tech support blog'>Tech support blog</a> <small>I&#8217;ve recently launched a tech support job, which combines aspects...</small></li>
<li><a href='http://www.hm2k.com/posts/suphp-and-phps' rel='bookmark' title='Permanent Link: suPHP and .phps PHP code highlighting support'>suPHP and .phps PHP code highlighting support</a> <small>Today a user on one of my web servers asked...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I wrote a little script for an article on fixr.co.uk entitled &#8220;<a href="http://www.fixr.co.uk/2009/10/09/remove-oga-notifier/">Remove OGA Notifier</a>&#8220;.</p>
<p>Today I discovered that <a href="http://whoisx.co.uk/mydigitallife.info"><em>mydigitallife.info</em></a> had clearly taken details from my batch file code and used it without giving me or fixr.co.uk any credit at all.</p>
<p><span id="more-541"></span></p>
<p>Just compare the actual functions in my <a href="http://hm2k.googlecode.com/svn-history/r40/trunk/code/batch/removeoga.bat">removeoga.bat</a> to their <a href="http://depositfiles.com/files/l4w52gsjv">RemoveOGA.bat</a>, you can clearly see it&#8217;s the same, yet no credit is given at all.</p>
<blockquote><p>mydigitallife.info is LAME.</p>
<p><em>- HM2K<br />
</em></p></blockquote>
<p>Taking someone else&#8217;s code and not giving any credit for it is LAME, yes <em>mydigitallife.info</em> is <strong>lame</strong> and I will be boycotting your site until further notice.</p>
<blockquote><p>@ECHO off<br />
TITLE mydigitallife.info Boycott<br />
ECHO mydigitallife.info Boycott because they stole my code without giving me credit.<br />
ECHO.<br />
ECHO This will bind mydigitallife.info and www.mydigitallife.info to 0.0.0.0<br />
PAUSE<br />
ECHO 0.0.0.0 www.mydigitallife.info &gt;&gt; %systemdrive%\windows\system32\drivers\etc\hosts<br />
ECHO 0.0.0.0 mydigitallife.info &gt;&gt; %systemdrive%\windows\system32\drivers\etc\hosts</p></blockquote>
<p>Simply copy this into a notepad window, and save as &#8220;mydigitallife_boycott.bat&#8221;, then run it.</p>
<p>Anyway, I&#8217;ve since improved my batch file to support more versions and languages, so if you copy that too, I&#8217;ll be on to you!</p>
<p>Thanks.</p>
<p><em>Note: If you were to clearly give me and fixr.co.uk credit, I may remove this post.</em></p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/tech-support-blog' rel='bookmark' title='Permanent Link: Tech support blog'>Tech support blog</a> <small>I&#8217;ve recently launched a tech support job, which combines aspects...</small></li>
<li><a href='http://www.hm2k.com/posts/suphp-and-phps' rel='bookmark' title='Permanent Link: suPHP and .phps PHP code highlighting support'>suPHP and .phps PHP code highlighting support</a> <small>Today a user on one of my web servers asked...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/mydigitallife-info-stole-my-code/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ident Spoofing</title>
		<link>http://www.hm2k.com/posts/ident-spoofing</link>
		<comments>http://www.hm2k.com/posts/ident-spoofing#comments</comments>
		<pubDate>Wed, 14 Oct 2009 12:23:01 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[ident]]></category>
		<category><![CDATA[oidentd]]></category>
		<category><![CDATA[rfc1413]]></category>
		<category><![CDATA[spoofing]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=517</guid>
		<description><![CDATA[Today I wrote about Oidentd on Wikipedia. Ident as per RFC 1413 is used for a few different services, in particular IRC. A feature of oidentd that my users find useful is ident spoofing.
Ident is important on IRC as some servers do not allow you to connect unless you have an ident, while others do, [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/configuring-a-freebsd-irc-shell-server' rel='bookmark' title='Permanent Link: Configuring a FreeBSD IRC Shell Server'>Configuring a FreeBSD IRC Shell Server</a> <small>This is a brief guide created to help configure a...</small></li>
<li><a href='http://www.hm2k.com/posts/freebsd-socks-proxy-for-mirc' rel='bookmark' title='Permanent Link: Setting up a FreeBSD socks proxy server for use with mIRC'>Setting up a FreeBSD socks proxy server for use with mIRC</a> <small>I&#8217;m getting fed up with my current IRC BNC software....</small></li>
<li><a href='http://www.hm2k.com/posts/longip-script' rel='bookmark' title='Permanent Link: longip perl script'>longip perl script</a> <small>I wanted to create a script that would convert a...</small></li>
<li><a href='http://www.hm2k.com/posts/hm2ks-code-repository' rel='bookmark' title='Permanent Link: HM2K&#8217;s code repository'>HM2K&#8217;s code repository</a> <small>HM2K&#8217;s code repository is now open for business! This repository...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today I wrote about <a href="http://en.wikipedia.org/wiki/Oidentd">Oidentd</a> on Wikipedia. <a href="http://en.wikipedia.org/wiki/Ident">Ident</a> as per <a href="http://tools.ietf.org/html/rfc1413">RFC 1413</a> is used for a few different services, in particular <a href="http://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC</a>. A feature of oidentd that my users find useful is ident spoofing.</p>
<p><span id="more-517"></span>Ident is important on IRC as some servers do not allow you to connect unless you have an ident, while others do, you find yourself with a tide (~) prefix before your username. These are sometimes banned. For example:</p>
<blockquote><p>HM2K!HM2K@ROFL.name</p>
<p><em>#This is an example of a real user with a real ident</em></p>
<p>baduser!~asdfg@123.123.123.123</p>
<p><em>#This is an example of a possible exploited system</em></p></blockquote>
<p>Generally the ident server (such as oidentd) will return the user&#8217;s username as the ident when it is requested, however on my servers, I allow some of my users to spoof their ident.</p>
<p>This means they can change their ident to whatever they like, regardless of their username.</p>
<p>To do this, you need to create the <a href="http://linux.die.net/man/5/oidentd.conf"><em>$HOME/.oidentd.conf</em></a> file, with the following content:</p>
<blockquote><p>global { reply &#8216;$ident&#8217;}</p>
<p><em>#Note: Where $ident is, replace with the ident you want.</em></p></blockquote>
<p>I know some users find this a bit difficult or confusing, so I created a script to do it for them.</p>
<ul>
<li><a href="http://hm2k.googlecode.com/svn/trunk/code/shell/setident.sh">setident.sh</a> &#8211; A script used to set your ident</li>
</ul>
<p>It&#8217;s works fine using the sh unix shell on FreeBSD.</p>
<p>If you are on my shell servers, you should be able to take advantage of this using the &#8220;setident&#8221; command.</p>
<p>Enjoy!</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/configuring-a-freebsd-irc-shell-server' rel='bookmark' title='Permanent Link: Configuring a FreeBSD IRC Shell Server'>Configuring a FreeBSD IRC Shell Server</a> <small>This is a brief guide created to help configure a...</small></li>
<li><a href='http://www.hm2k.com/posts/freebsd-socks-proxy-for-mirc' rel='bookmark' title='Permanent Link: Setting up a FreeBSD socks proxy server for use with mIRC'>Setting up a FreeBSD socks proxy server for use with mIRC</a> <small>I&#8217;m getting fed up with my current IRC BNC software....</small></li>
<li><a href='http://www.hm2k.com/posts/longip-script' rel='bookmark' title='Permanent Link: longip perl script'>longip perl script</a> <small>I wanted to create a script that would convert a...</small></li>
<li><a href='http://www.hm2k.com/posts/hm2ks-code-repository' rel='bookmark' title='Permanent Link: HM2K&#8217;s code repository'>HM2K&#8217;s code repository</a> <small>HM2K&#8217;s code repository is now open for business! This repository...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/ident-spoofing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pingotron</title>
		<link>http://www.hm2k.com/posts/pingotron</link>
		<comments>http://www.hm2k.com/posts/pingotron#comments</comments>
		<pubDate>Thu, 01 Oct 2009 11:23:44 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[pingotron]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=276</guid>
		<description><![CDATA[I&#8217;ve been meaning to publish a post about Pingotron for some time now, but now I fear it&#8217;s already too late.
Quite a few months back I was looking for an application that could sit on my desktop and tell me instantly if any of my servers had stopped responding by ping.
There&#8217;s probably hundreds of ways [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/safely-remove-hardware-icon' rel='bookmark' title='Permanent Link: Safely Remove Hardware Icon'>Safely Remove Hardware Icon</a> <small>Here&#8217;s a quick guide on what to do if your...</small></li>
<li><a href='http://www.hm2k.com/posts/icon-software' rel='bookmark' title='Permanent Link: Icon Software'>Icon Software</a> <small>Over the past few weeks I&#8217;ve been assisting the creation...</small></li>
<li><a href='http://www.hm2k.com/posts/ftp-server-for-windows' rel='bookmark' title='Permanent Link: FTP server for windows'>FTP server for windows</a> <small>I have been on the lookout for a decent FTP...</small></li>
<li><a href='http://www.hm2k.com/posts/firefox-always-on-top' rel='bookmark' title='Permanent Link: Firefox &#8220;Always On Top&#8221; on Windows XP'>Firefox &#8220;Always On Top&#8221; on Windows XP</a> <small>When watching long streaming online videos I often watch them...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><em>I&#8217;ve been meaning to publish a post about Pingotron for some time now, but now I fear it&#8217;s already too late.</em></p>
<p>Quite a few months back I was looking for an application that could sit on my desktop and tell me instantly if any of my servers had stopped responding by <a href="http://en.wikipedia.org/wiki/Ping">ping</a>.</p>
<p><span id="more-276"></span>There&#8217;s probably hundreds of ways of monitoring services, including paid for web services such as <a href="http://www.pingdom.com/">Pingdom</a>, and open source software that runs on your web server such as <a href="http://www.nagios.org/">Nagios</a>. None of them really hit the spot for the services I wanted to monitor, or they were expensive.</p>
<p>A quick and easy way to monitor services that was fairly non-intrusive was what I wanted. Enough detail to tell you that a server was unreachable by ping and when it happened.</p>
<p><a href="http://express-press-release.net/46/PR%20-%20Quick%20Troubleshooting%20or%20How%20to%20Be%20Always%20On%20the%20Watch.php">Pingotron</a> seemed ideal&#8230;</p>
<blockquote><p><em>Pingotron</em> is a computer program for controlling and monitoring network devices, such as computers, network printers, routers and other devices, on TCP/IP networks. The program has two versions: Pingotron (basic) and Pingotron PRO.</p>
<p>A list of desired hosts that you wish to control are entered into the program.</p>
<p>The program sends ICMP “echo request” packets to each host and listens for ICMP “echo response” replies. Various properties (ping interval, size of packet, time-out request) can be configured for each host. The program can notify an administrator when a problem arises with any host with an alert sound, e-mail, blinking tray notification and/or network notification. The PRO version has an alarm history log feature, alarm statistics, and ping history and ping statistics for all hosts, in addition, it has a multi-user mode.</p></blockquote>
<p>I started to use it, however, straight away I came across an odd issue which seemed to only affect the <a href="http://en.wikipedia.org/wiki/Netgear_DG834G">DG834 series routers</a>.</p>
<p>The software reported the ping response from these routers as an &#8220;unknown response&#8221;, while in windows regular ping, they responded just fine.</p>
<p>It was clear that the software seemed to think that the response was malformed, perhaps it wass, however regular windows ping does not.</p>
<p>I emailed the details over to the author via the support email address. I got a response the same day.</p>
<p><em>Anatoly Dobrinin</em> fixed the bug, provided me with the latest PRO version download and a valid serial number to register it as a full version.</p>
<p>What a great author! I was impressed. Sure I would never have paid for this software, as there were clearly free solutions, so this was great!</p>
<p>This was last year in 2008. This year, I find that if you visit Pingotron.com you find yourself at some kind of ad filled domain parking page. Fortunately you can still find an <a href="http://web.archive.org/web/20080720072228/http://www.pingotron.com/">archived copy of Pingotron.com</a> in the web archive.</p>
<p><strong>Update:</strong> As Pingotron appears to be no more I have decided to share my resources&#8230;</p>
<blockquote><p>Hello,</p>
<p>Thank you for your message.</p>
<p>This bug has been fixed today.</p>
<p>Please download and install the program again.</p>
<p>You can download the program here:</p>
<p><a href="http://www.pingotron.com/setup_pro.zip">http://www.pingotron.com/setup_pro.zip</a></p>
<p>You can use this registration code to register  the pro version:</p>
<p>EET4-3EZS-VTK0-M0U7</p>
<p>Best regards,<br />
Anatoly Dobrinin</p></blockquote>
<p><em>Note: If Anatoly would like me to remove this, feel free to contact me.</em></p>
<p><em>A copy of <a href="http://www.megaupload.com/?d=FMZ5OM5I">setup_pro.zip</a> can be found on megaupload.<br />
</em></p>
<p><strong>Further Update: </strong>I had another issue that I tried to report, but since pingotron.com is unreachable, nothing can be done about it.</p>
<p>It wasn&#8217;t a major issue. The issue was that sometimes when explorer crashes, the Pingotron icon does not reappear in the system tray.</p>
<p>There was no way to recover the icon or window, without killing the &#8220;Pingotron.exe&#8221; and restarting it. Running &#8220;Pingotron.exe&#8221; again would only give you the error &#8220;The program is already running!&#8221;.</p>
<p>I solved this by writing a script using AutoIT which would Check if the Pingotron window exists, restore it, otherwise run &#8220;Pingotron.exe&#8221;. I called it <a href="http://hm2k.googlecode.com/svn/trunk/code/autoit/Start_Pingotron.au3">Start Pingotron</a>.</p>
<p>Anyway, since Pingotron is clearly no longer in active development, I am wondering is there&#8217;s anything else to use instead. Any ideas? Let me know.</p>
<p>Perhaps I&#8217;ll just end up writing my own service instead&#8230;</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 884px; width: 1px; height: 1px;">I noticed that sometimes when explorer crashes, the pingotron icon does not reappear in the system tray.</div>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/safely-remove-hardware-icon' rel='bookmark' title='Permanent Link: Safely Remove Hardware Icon'>Safely Remove Hardware Icon</a> <small>Here&#8217;s a quick guide on what to do if your...</small></li>
<li><a href='http://www.hm2k.com/posts/icon-software' rel='bookmark' title='Permanent Link: Icon Software'>Icon Software</a> <small>Over the past few weeks I&#8217;ve been assisting the creation...</small></li>
<li><a href='http://www.hm2k.com/posts/ftp-server-for-windows' rel='bookmark' title='Permanent Link: FTP server for windows'>FTP server for windows</a> <small>I have been on the lookout for a decent FTP...</small></li>
<li><a href='http://www.hm2k.com/posts/firefox-always-on-top' rel='bookmark' title='Permanent Link: Firefox &#8220;Always On Top&#8221; on Windows XP'>Firefox &#8220;Always On Top&#8221; on Windows XP</a> <small>When watching long streaming online videos I often watch them...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/pingotron/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EFnet UK</title>
		<link>http://www.hm2k.com/posts/efnet-uk</link>
		<comments>http://www.hm2k.com/posts/efnet-uk#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:40:56 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[IRC]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[demon]]></category>
		<category><![CDATA[efnet]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=515</guid>
		<description><![CDATA[On Sunday July 19 2009 Hardy announced on the EFnet website that Demon Internet will be delinking efnet.demon.co.uk and hub.uk from the EFnet IRC network in August.
For me, it marks the end of an era. There are no more UK IRC servers on the EFnet IRC network.

Gone are those days that I remember back in [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/lame-botnet' rel='bookmark' title='Permanent Link: Lame Botnet'>Lame Botnet</a> <small>Yes, my botnet is pretty lame, but it&#8217;s also kinda...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>On Sunday July 19 2009 Hardy announced on the <a href="http://www.efnet.org/">EFnet website</a> that <a href="http://en.wikipedia.org/wiki/Demon_Internet">Demon Internet</a> will be <a href="http://forum.efnet.org/viewtopic.php?t=2491">delinking efnet.demon.co.uk and hub.uk</a> from the <a href="http://en.wikipedia.org/wiki/EFnet">EFnet IRC network</a> in August.</p>
<p>For me, it marks the end of an era. There are no more UK IRC servers on the EFnet IRC network.</p>
<p><span id="more-515"></span></p>
<p>Gone are those days that I remember back in 1998 when the <a href="http://tools.ietf.org/html/rfc1459">IRC protocol</a> was an important part of the internet for any ISP.</p>
<p>It seems that IRC for many people has been replaced by many other services such as Instant Messaging, Social Networks, Blogs and BitTorrent. Yet IRC is still here.</p>
<p>I have put the delink down to the fact that Demon can no longer justify the running costs of such a service in the current economic climate.</p>
<p>It&#8217;s a real sign of the times when Demon, one of the first commercial UK ISPs can no longer support a service it has been running for over 16 years.</p>
<p>Demon has become a household name through the sponsorship of the EFnet IRC server and has become a very reputable ISP because of it, especially to administrators.</p>
<p>Demon has not released any kind of announcement nor has it updated it&#8217;s site to reflect the change and as I am not a Demon customer they have refused to comment on the situation.</p>
<p>Is this the end for EFnet UK? or Is this the start of the <a href="http://irchelp.org/irchelp/networks/efnetsux.html">end for EFnet</a>?  I hope not&#8230;</p>
<p>I&#8217;ve decided to start making steps in the right direction and so I&#8217;ve setup a website and mailing list called <a href="http://www.efnet.org.uk/">EFnet UK</a>.</p>
<p>If you would like to be part of EFnet UK, please join the <a href="http://efnet.org.uk/mailman/listinfo/efnetuk_efnet.org.uk">EFnet UK mailing list</a>.</p>
<p>EFnet needs a new sponsor for a UK IRC server and we need your help to get one. Maybe you can help.</p>
<p>Thanks.</p>
<p><strong>Update 09/10/09:</strong> Multiplay is now sponsoring a new EFnet UK server. <a href="http://stats.efnet.org/servers/view/?sid=8&amp;show=motd">efnet.demon.co.uk</a> is dead, long live <a href="http://stats.efnet.org/servers/view/?sid=127&amp;show=motd">efnet.multiplay.co.uk</a>. Thanks goes to <a href="http://twitter.com/jamesoff">@JamesOff</a>.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/lame-botnet' rel='bookmark' title='Permanent Link: Lame Botnet'>Lame Botnet</a> <small>Yes, my botnet is pretty lame, but it&#8217;s also kinda...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/efnet-uk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery sucks at browser detection</title>
		<link>http://www.hm2k.com/posts/jquery-sucks-at-browser-detection</link>
		<comments>http://www.hm2k.com/posts/jquery-sucks-at-browser-detection#comments</comments>
		<pubDate>Tue, 22 Sep 2009 16:16:18 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[layout engine]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[sniffer]]></category>
		<category><![CDATA[useragent]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=507</guid>
		<description><![CDATA[This week i&#8217;ve been tweaking a little site I&#8217;ve started called &#8220;ismybrowseruptodate.com&#8220;, which is designed to assist people who don&#8217;t know whether their browser is up-to-date or not.
At first I thought this would be simple, because I knew jQuery had browser detection and had a variable called jQuery.browser.version, which would be very useful for checking [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/css-seo' rel='bookmark' title='Permanent Link: Does using CSS affect SEO?'>Does using CSS affect SEO?</a> <small>I get asked this question time and time again. People...</small></li>
<li><a href='http://www.hm2k.com/posts/why-aol-sucks' rel='bookmark' title='Permanent Link: Why AOL sucks'>Why AOL sucks</a> <small> I have a client that is currently on AOL,...</small></li>
<li><a href='http://www.hm2k.com/posts/how-not-to-use-phpmailer' rel='bookmark' title='Permanent Link: How not to use PHPMailer'>How not to use PHPMailer</a> <small>I came across PHPMailer usage the other day on a...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This week i&#8217;ve been tweaking a little site I&#8217;ve started called &#8220;<a href="http://ismybrowseruptodate.com/">ismybrowseruptodate.com</a>&#8220;, which is designed to assist people who don&#8217;t know whether their browser is up-to-date or not.</p>
<p>At first I thought this would be simple, because I knew jQuery had browser detection and had a variable called <a href="http://docs.jquery.com/Utilities/jQuery.browser.version">jQuery.browser.version</a>, which would be very useful for checking the browser version, or so I thought.</p>
<p><span id="more-507"></span>Don&#8217;t get me wrong here, I think jQuery is a fantastic javascript framework and is great at helping you to avoid reinventing the wheel, but it sucks at browser detection!</p>
<p>On closer inspection I see that jQuery is deprecating this variable in place for better ways of <a href="http://xkr.us/js/detect">browser detection</a>, namely by <a href="http://developer.apple.com/internet/webcontent/objectdetection.html">not detecting the browser, but detecting technologies (via objects)</a> instead.</p>
<p>As such, you can already see evidence of the jQuery team <a href="http://www.reddit.com/r/programming/comments/7l2mr/jquery_removes_all_browser_sniffing/">deprecating the browser sniffing</a> by removing references to the jquery.browser variable.</p>
<p>The problem is that even now it still exists in jQuery because it is being used for backwards compatibility and by plugins. It can&#8217;t just be removed, so it must still be maintained.</p>
<p>As we know, jQuery sucks at browser detection because they&#8217;ve been detecting by browser, instead of by technologies all along, so what else is new?</p>
<p>Not long ago Opera Software released the latest version of their <a href="http://www.opera.com/">Opera Browser</a>, which is version 10, however, during trials they came across some issues where some sites would detect the wrong version, forcing Opera to <a href="http://dev.opera.com/articles/view/opera-ua-string-changes/">make changes to Opera&#8217;s user agent string</a>.</p>
<p>Guess what?</p>
<p>jQuery is detecting the wrong version number for Opera. It&#8217;s detecting &#8220;Opera v10&#8243; as &#8220;Opera v9.80&#8243;.</p>
<p>However, in this instance it isn&#8217;t much of a problem because jQuery is moving it&#8217;s dependencies away from browser sniffing to technology detection, and opera made changes to their user agent string to handle it.</p>
<p>So what is the problem?</p>
<p>The problem is that jQuery is not maintained to cope with the changes to the user agent string and that they are getting engine versions confused with browser versions. Let&#8217;s take a look at the <a href="http://dev.jquery.com/export/6582/trunk/jquery/src/core.js">actual core code</a>:</p>
<blockquote><p>(userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) [0,'0'])[1]</p></blockquote>
<p>As you can see it has 4 checks&#8230;</p>
<ul>
<li>rv=Revision of the Gecko &#8220;layout engine&#8221;.</li>
<li>it=Version of the WebKit &#8220;layout engine&#8221;.</li>
<li>ra=Version of Opera, and NOT &#8220;Presto&#8221; it&#8217;s layout engine.</li>
<li>ie=Version of Internet Explorer, but NOT &#8220;Trident&#8221; it&#8217;s layout engine.</li>
</ul>
<p>After that you can see the browser checks it does&#8230;</p>
<blockquote><p>safari: /webkit/.test( userAgent ),<br />
opera: /opera/.test( userAgent ),<br />
msie: /msie/.test( userAgent ) &amp;&amp; !/opera/.test( userAgent ),<br />
mozilla: /mozilla/.test( userAgent ) &amp;&amp; !/(compatible|webkit)/.test( userAgent )</p></blockquote>
<p>As you can see, it lists 4 browsers, some test for the layout engine, some test for the browser name, mozilla is a test for neither and what about Google Chrome?</p>
<p>The problem is that many browsers use the same layout engine, but may result in different version numbers.</p>
<p>So, the question is, are we detecting the <a href="http://en.wikipedia.org/wiki/Web_browser">web browser</a> or the <a href="http://en.wikipedia.org/wiki/Layout_engine">layout engine</a>?</p>
<p>If it&#8217;s browsers, the version match is all wrong and doesn&#8217;t consider the changes made to Opera&#8217;s user agent string; and if it&#8217;s layout engines it&#8217;s detecting the wrong version numbers from the browser rather than the engine.</p>
<p>For jQuery at least, considering there are only about <a href="http://en.wikipedia.org/wiki/List_of_layout_engines">20 notable layout engines</a>, it would make more sense to match those rather than the literally hundreds of browsers, many of which are based on the same layout engine.</p>
<p>So how do we fix this?</p>
<p>It depends what you want to detect, whether it be the browser or the layout engine. The problem is that if you change this now, older code will no longer be compatible, as the problem with version numbers will arise.</p>
<p>I have raised this as a bug <a href="http://dev.jquery.com/ticket/5279">#5279</a> with the jQuery team, but I don&#8217;t expect much to be done about it.</p>
<p>Instead, I have created and am using a better browser sniffer on &#8220;<a href="http://ismybrowseruptodate.com/">ismybrowseruptodate.com</a>&#8221; in javascript, however at the moment it is not open source code. If you are interested, let me know and I will release it as open source, along with the layout engine sniffer and detection I started developing too.</p>
<p>Enjoy!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 452px; width: 1px; height: 1px;">// Use of jQuery.browser is deprecated.<br />
// It&#8217;s included for backwards compatibility and plugins,<br />
// although they should work to migrate away.<br />
browser: {<br />
version: (/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/.exec(userAgent) || [0,'0'])[1],<br />
safari: /webkit/.test( userAgent ),<br />
opera: /opera/.test( userAgent ),<br />
msie: /msie/.test( userAgent ) &amp;&amp; !/opera/.test( userAgent ),<br />
mozilla: /mozilla/.test( userAgent ) &amp;&amp; !/(compatible|webkit)/.test( userAgent )<br />
}</div>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/css-seo' rel='bookmark' title='Permanent Link: Does using CSS affect SEO?'>Does using CSS affect SEO?</a> <small>I get asked this question time and time again. People...</small></li>
<li><a href='http://www.hm2k.com/posts/why-aol-sucks' rel='bookmark' title='Permanent Link: Why AOL sucks'>Why AOL sucks</a> <small> I have a client that is currently on AOL,...</small></li>
<li><a href='http://www.hm2k.com/posts/how-not-to-use-phpmailer' rel='bookmark' title='Permanent Link: How not to use PHPMailer'>How not to use PHPMailer</a> <small>I came across PHPMailer usage the other day on a...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/jquery-sucks-at-browser-detection/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
