<?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>Blog by Andreas Glaser</title>
	<atom:link href="http://www.andreas-glaser.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andreas-glaser.com</link>
	<description>Development, Technology and such...</description>
	<lastBuildDate>Wed, 18 May 2011 23:16:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>New Project &#8211; sweebe.com</title>
		<link>http://www.andreas-glaser.com/2011/04/03/new-project-sweebe-com/</link>
		<comments>http://www.andreas-glaser.com/2011/04/03/new-project-sweebe-com/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 09:55:09 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=632</guid>
		<description><![CDATA[Quietly I&#8217;ve been working over the last few months on a website called sweebe. It&#8217;s an Events website which is at the moment dedicated to Dublin. Two days ago I put live the first alpha version. Feel free to have a first look. http://www.sweebe.com/ More on sweebe.com on it&#8217;s official blog: http://www.blog.sweebe.com/]]></description>
			<content:encoded><![CDATA[<p>Quietly I&#8217;ve been working over the last few months on a website called sweebe.<br />
It&#8217;s an Events website which is at the moment dedicated to Dublin.</p>
<p>Two days ago I put live the first alpha version.<br />
Feel free to have a first look.</p>
<p><a href="http://www.sweebe.com/">http://www.sweebe.com/</a></p>
<p>More on sweebe.com on it&#8217;s official blog:</p>
<p><a href="http://www.blog.sweebe.com/" target="_blank">http://www.blog.sweebe.com/</a></p>
<fb:like href='http://www.andreas-glaser.com/2011/04/03/new-project-sweebe-com/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2011/04/03/new-project-sweebe-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.10 to 11.04 Upgrade Issue</title>
		<link>http://www.andreas-glaser.com/2011/02/28/ubuntu-10-10-to-11-04-upgrade-issue/</link>
		<comments>http://www.andreas-glaser.com/2011/02/28/ubuntu-10-10-to-11-04-upgrade-issue/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 22:33:45 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=627</guid>
		<description><![CDATA[Just came across a little issue as I tried to upgrade my Ubuntu 10.10 (maverick) to 11.04 Alpha 2 (Natty). I followed the offical upgrade guide on ubuntu.com (http://www.ubuntu.com/testing/natty/alpha2) and ran into following error. root@jazz:/home/andreas-glaser# update-manager -d warning: could not initiate dbus ** GLib-GIO:ERROR:/build/buildd/glib2.0-2.26.1/gio/gdbusconnection.c:2270:initable_init: assertion failed: (connection-&#62;initialization_error == NULL) Aborted Solution Instead of &#8220;update-manager -d&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Just came across a little issue as I tried to upgrade my Ubuntu 10.10 (maverick) to 11.04 Alpha 2 (Natty).<br />
I followed the offical upgrade guide on <a href="ubuntu.com" target="_blank">ubuntu.com</a> (<a href="http://www.ubuntu.com/testing/natty/alpha2" target="_blank">http://www.ubuntu.com/testing/natty/alpha2</a>) and ran into following error.</p>
<blockquote><p>root@jazz:/home/andreas-glaser# update-manager -d<br />
warning: could not initiate dbus<br />
**<br />
GLib-GIO:ERROR:/build/buildd/glib2.0-2.26.1/gio/gdbusconnection.c:2270:initable_init: assertion failed: (connection-&gt;initialization_error == NULL)<br />
Aborted</p>
</blockquote>
<h2>Solution</h2>
<p>Instead of &#8220;update-manager -d&#8221; simply use &#8220;dbus-launch update-manager -d&#8221;</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<fb:like href='http://www.andreas-glaser.com/2011/02/28/ubuntu-10-10-to-11-04-upgrade-issue/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2011/02/28/ubuntu-10-10-to-11-04-upgrade-issue/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to make Firefox look like Chome</title>
		<link>http://www.andreas-glaser.com/2011/01/18/how-to-make-look-firefox-like-chome/</link>
		<comments>http://www.andreas-glaser.com/2011/01/18/how-to-make-look-firefox-like-chome/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 15:03:07 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=617</guid>
		<description><![CDATA[Granted, Googles Chrome looks a thousand times better than Firefoxes default theme. Luckily we can with only three small addons make Firefox look and feel almost identical. Required Addons Chromifox Basic &#8211; Chrome theme for Firefox Ominbar &#8211; Combines address and searchbar Download Statusbar &#8211; Displays download statuses in the statusbar Result Enjoy!]]></description>
			<content:encoded><![CDATA[<p>Granted, Googles Chrome looks a thousand times better than Firefoxes default theme.<br />
Luckily we can with only three small addons make Firefox look and feel almost identical.</p>
<h2>Required Addons</h2>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/chromifox-basic/" target="_blank">Chromifox Basic</a> &#8211; Chrome theme for Firefox</li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/omnibar/" target="_blank">Ominbar</a> &#8211; Combines address and searchbar</li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/download-statusbar/">Download Statusbar</a> &#8211; Displays download statuses in the statusbar</li>
</ul>
<h2>Result</h2>
<p><a href="http://www.andreas-glaser.com/wp-content/uploads/2011/01/Welcome-to-Flickr-Photo-Sharing_1295362601560.png"><img class="alignnone size-medium wp-image-618" title="Firefox Chrome Theme" src="http://www.andreas-glaser.com/wp-content/uploads/2011/01/Welcome-to-Flickr-Photo-Sharing_1295362601560-300x188.png" alt="" width="300" height="188" /></a></p>
<p>Enjoy!</p>
<fb:like href='http://www.andreas-glaser.com/2011/01/18/how-to-make-look-firefox-like-chome/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2011/01/18/how-to-make-look-firefox-like-chome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal 7 &#8211; Almost here</title>
		<link>http://www.andreas-glaser.com/2011/01/04/drupal-7-almost-here/</link>
		<comments>http://www.andreas-glaser.com/2011/01/04/drupal-7-almost-here/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 12:06:31 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Drupal-7.x]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=606</guid>
		<description><![CDATA[The waiting is almost over &#8211; Drupal 7 is finally going to be released tomorrow the 5th of January 2011. D7 will bring loads of new and improved features, modules from D6 which proved to be useful that made it into the core and much better default administration layouts. Especially the new layouts will help [...]]]></description>
			<content:encoded><![CDATA[<p>The waiting is almost over &#8211; Drupal 7 is finally going to be released tomorrow the <a href="http://buytaert.net/drupal-7-to-be-released-on-january-5th-with-one-ginormous-party">5th of January 2011</a>.<br />
D7 will bring loads of new and improved features, modules from D6 which proved to be useful that made it into the core and much better default administration layouts.</p>
<p>Especially the new layouts will help newbies to get their heads around Drupal in less time to fully enjoy the endless flexibility and efficiency.</p>
<p>Drupal certainly stood the test of time since it&#8217;s release in January 2001 and will definitely experience a boost from this major release.</p>
<p><a href="http://www.google.com/trends?q=drupal%2C+joomla%2C+typo3%2C+concrete5&amp;ctab=0&amp;geo=all&amp;date=all&amp;sort=0">Google Trends Comparison</a> (Drupal vs Joomla vs Typo3 vs Concrete5)</p>
<p>If you haven&#8217;t yet worked with Drupal this is definitely the perfect time to get in touch.</p>
<p><strong>Places all your questions will be answered<br />
</strong></p>
<ul>
<li><a href="http://drupal.org/community">Drupal Community</a></li>
<li><a href="http://drupal.org/irc">Drupal IRC Channel</a></li>
</ul>
<p>Personally I&#8217;ve been working with Drupal for many years now and developed quite some business websites on it and it gets my recommendation any time. (if you&#8217;re not a bloody rookie ;) )</p>
<p><a href="http://drupal.org/">http://drupal.org/</a></p>
<fb:like href='http://www.andreas-glaser.com/2011/01/04/drupal-7-almost-here/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2011/01/04/drupal-7-almost-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webservices &#8211; REST vs. Soap</title>
		<link>http://www.andreas-glaser.com/2010/11/29/webservices-rest-vs-soap/</link>
		<comments>http://www.andreas-glaser.com/2010/11/29/webservices-rest-vs-soap/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 12:19:26 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Soap]]></category>
		<category><![CDATA[Webservice]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=602</guid>
		<description><![CDATA[As I was browsing the web I came across this excellent article about REST and Soap written by Paul Prescod. Roots of the REST/SOAP Debate I hope you guys enjoy it as much as I did.]]></description>
			<content:encoded><![CDATA[<p>As I was browsing the web I came across this excellent article about REST and Soap written by Paul Prescod.</p>
<p><a href="http://www.prescod.net/rest/rest_vs_soap_overview/" target="_blank">Roots of the REST/SOAP Debate</a></p>
<p>I hope you guys enjoy it as much as I did.</p>
<fb:like href='http://www.andreas-glaser.com/2010/11/29/webservices-rest-vs-soap/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/11/29/webservices-rest-vs-soap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import Mysql Dump with correct character encoding</title>
		<link>http://www.andreas-glaser.com/2010/08/09/import-mysql-dump-with-correct-character-encoding/</link>
		<comments>http://www.andreas-glaser.com/2010/08/09/import-mysql-dump-with-correct-character-encoding/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 11:58:05 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Commandline]]></category>
		<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=593</guid>
		<description><![CDATA[It happened to me quite a few times now, that I imported a mysql dump file and afterwards noticed that the character encoding was broken. To help you guys preventing this from happening use following import command. ?View Code BASH1 mysql -u root -p --default_character_set utf8 NAME_OF_YOUR_DATABASE &#38;lt; mysql_dump_file.sql The important argument is &#8220;&#8211;default_character_set utf8&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>It happened to me quite a few times now, that I imported a mysql dump file and afterwards noticed that the character encoding was broken.<br />
To help you guys preventing this from happening use following import command.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p593code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5932"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p593code2"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> --default_character_set utf8 NAME_OF_YOUR_DATABASE <span style="color: #000000; font-weight: bold;">&amp;</span>lt; mysql_dump_file.sql</pre></td></tr></table></div>

<p>The important argument is &#8220;<strong>&#8211;default_character_set utf8</strong>&#8221; to preserve the encoding.</p>
<p>Enjoy</p>
<fb:like href='http://www.andreas-glaser.com/2010/08/09/import-mysql-dump-with-correct-character-encoding/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/08/09/import-mysql-dump-with-correct-character-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kohana 3 &#8211; ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given</title>
		<link>http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/</link>
		<comments>http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 17:05:18 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Kohana 3.x]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=585</guid>
		<description><![CDATA[?View Code CODE1 ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given If Kohana 3 throws this exception, that means that your currently installed PHP version is lower than 5.2.3 . This can be easily be fixed by updating PHP to the latest stable version (recommended) or by changing one of Kohana [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code7'); return false;">View Code</a> CODE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5857"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code7"><pre class="code" style="font-family:monospace;">ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given</pre></td></tr></table></div>

<p>If Kohana 3 throws this exception, that means that your currently installed PHP version is lower than 5.2.3 .<br />
This can be easily be fixed by updating PHP to the latest stable version (recommended) or by changing one of Kohana (not recommended).</p>
<h3>To fix it code wise open following file with your preferred editor</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code8'); return false;">View Code</a> CODE</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5858"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code8"><pre class="code" style="font-family:monospace;">/system/classes/kohana/html.php</pre></td></tr></table></div>

<h3>Search for&#8230;</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5859"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code9"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">return</span> <a href="http://www.php.net/htmlspecialchars"><span style="color: #990000;">htmlspecialchars</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> Kohana<span style="color: #339933;">::</span><span style="color: #000088;">$charset</span><span style="color: #339933;">,</span> <span style="color: #000088;">$double_encode</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>&#8230; and change it into</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p585code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p58510"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p585code10"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">return</span> <a href="http://www.php.net/htmlspecialchars"><span style="color: #990000;">htmlspecialchars</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> Kohana<span style="color: #339933;">::</span><span style="color: #000088;">$charset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Done :)</p>
<fb:like href='http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/06/11/kohana-3-errorexception-warning-htmlspecialchars-expects-at-most-3-parameters-4-given/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Beginners &#8211; How to get online time of a user</title>
		<link>http://www.andreas-glaser.com/2010/05/24/php-beginners-how-to-get-online-time-of-a-user/</link>
		<comments>http://www.andreas-glaser.com/2010/05/24/php-beginners-how-to-get-online-time-of-a-user/#comments</comments>
		<pubDate>Mon, 24 May 2010 16:49:04 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=560</guid>
		<description><![CDATA[A common task in web development is to track or show a users online time. Theory We record and save the time (in seconds) of the users first interaction with our website. On every following click we subtract this information with the current time. Working example ?View Code PHP1 2 3 4 5 6 7 [...]]]></description>
			<content:encoded><![CDATA[<p>A common task in web development is to track or show a users online time.</p>
<h2>Theory</h2>
<p>We record and save the time (in seconds) of the users first interaction with our website. On every following click we subtract this information with the current time.</p>
<h2>Working example</h2>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p560code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56012"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code" id="p560code12"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* tell php to start a new or resume an existing session */</span>
<a href="http://www.php.net/session_start"><span style="color: #990000;">session_start</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* store time of first user interaction */</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'session.started'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'session.started'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* calculate time elapsed since first click */</span>
<span style="color: #000088;">$onlineTime</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'session.started'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* display online time in various formats */</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'Seconds: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$onlineTime</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'Minutes:'</span><span style="color: #339933;">.</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$onlineTime</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'Hours:'</span><span style="color: #339933;">.</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$onlineTime</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'Days:'</span><span style="color: #339933;">.</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$onlineTime</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

Note: There is a file embedded within this post, please visit this post to download the file.
<p>Enjoy!</p>
<fb:like href='http://www.andreas-glaser.com/2010/05/24/php-beginners-how-to-get-online-time-of-a-user/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/05/24/php-beginners-how-to-get-online-time-of-a-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kohana 3 &#8211; How to get current absolute and relative url</title>
		<link>http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/</link>
		<comments>http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/#comments</comments>
		<pubDate>Mon, 17 May 2010 09:10:22 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Kohana 3.x]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=553</guid>
		<description><![CDATA[?View Code PHP1 2 print URL::site&#40;Request::instance&#40;&#41;-&#62;uri&#40;&#41;, TRUE&#41;; // http://www.example.com/kohana/info/index print URL::site&#40;Request::instance&#40;&#41;-&#62;uri&#40;&#41;&#41;; // /kohana/info/index]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p553code14'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p55314"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p553code14"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">print</span> URL<span style="color: #339933;">::</span><span style="color: #004000;">site</span><span style="color: #009900;">&#40;</span>Request<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uri</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// http://www.example.com/kohana/info/index</span>
<span style="color: #b1b100;">print</span> URL<span style="color: #339933;">::</span><span style="color: #004000;">site</span><span style="color: #009900;">&#40;</span>Request<span style="color: #339933;">::</span><span style="color: #004000;">instance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uri</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// /kohana/info/index</span></pre></td></tr></table></div>

<fb:like href='http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/05/17/kohana-3-how-to-get-current-absolute-and-relative-url/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Allow mock locations&#8221; &#8211; Android</title>
		<link>http://www.andreas-glaser.com/2010/04/28/allow-mock-locations-android/</link>
		<comments>http://www.andreas-glaser.com/2010/04/28/allow-mock-locations-android/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 08:54:47 +0000</pubDate>
		<dc:creator>Andreas Glaser</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTC Desire]]></category>
		<category><![CDATA[Smartphone]]></category>

		<guid isPermaLink="false">http://www.andreas-glaser.com/?p=551</guid>
		<description><![CDATA[&#8220;Allow mock locations&#8221; &#8211; means to be able to fake/simulate the location you&#8217;re at for development purposes]]></description>
			<content:encoded><![CDATA[<p>&#8220;Allow mock locations&#8221; &#8211; means to be able to fake/simulate the location you&#8217;re at for development purposes</p>
<fb:like href='http://www.andreas-glaser.com/2010/04/28/allow-mock-locations-android/' send='' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like>]]></content:encoded>
			<wfw:commentRss>http://www.andreas-glaser.com/2010/04/28/allow-mock-locations-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

