<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Navarr's Tech Side</title>
	
	<link>http://tech.navarr.me</link>
	<description>The Technical Side of my Life</description>
	<lastBuildDate>Sun, 11 Jul 2010 00:52:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<cloud domain="tech.navarr.me" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/navarrstech" /><feedburner:info uri="navarrstech" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>30.055195</geo:lat><geo:long>-95.468263</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><item>
		<title>How to create a socket server in PHP</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/wBCa8-fsXgU/how-to-create-a-socket-server-in-php.html</link>
		<comments>http://tech.navarr.me/2010/07/how-to-create-a-socket-server-in-php.html#comments</comments>
		<pubDate>Wed, 30 Jun 2010 23:47:28 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[class::IRCServer]]></category>
		<category><![CDATA[class::SocketServer]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/?p=470</guid>
		<description><![CDATA[Ever tried searching for information on how to properly create a multi-client socket server in PHP?  You’ll get plenty of results with outdated and messy source code, some of which won’t even work. This was the my state a couple days ago when I decided that I wanted to build an IRC server.  The why [...]]]></description>
			<content:encoded><![CDATA[<p>Ever tried searching for information on how to properly create a multi-client socket server in PHP?  You’ll get plenty of results with outdated and messy source code, some of which won’t even work.</p>
<p>This was the my state a couple days ago when I decided that I wanted to build an IRC server.  The why is not important… (<em>For the fun of building an IRC Server</em>).  So I googled around a <span style="text-decoration: line-through;">hell of a lot</span> bit until I finally found some code that worked on its own, and quickly built a semi-functional IRC server using it, and headed off to sleep at 5am.</p>
<p>The next day I was very, very happy with the results of my hard labor, but it wasn’t good enough, so I started re-writing it from scratch as an Object, and thus I created <a href="http://gist.github.com/457900">class::IRCServer</a>.</p>
<p>Today, once I felt that I was finished screwing around with my newly built IRCd, I decided to modify the function enough to be used on its own as a socket server, to share with the world.</p>
<p>And thus, <a href="http://gist.github.com/459321">class::SocketServer</a> was created.</p>
<pre><div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
	<span style="color: #666666; font-style: italic;">/*!	@class		SocketServer
		@author		Navarr Barnier
		@abstract 	A Framework for creating a multi-client server using the PHP language.
	 */</span>
	<span style="color: #000000; font-weight: bold;">class</span> SocketServer
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">/*!	@var		config
			@abstract	Array - an array of configuration information used by the server.
		 */</span>
		protected <span style="color: #000088;">$config</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		hooks
			@abstract	Array - a dictionary of hooks and the callbacks attached to them.
		 */</span>
		protected <span style="color: #000088;">$hooks</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		master_socket
			@abstract	resource - The master socket used by the server.
		 */</span>
		protected <span style="color: #000088;">$master_socket</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		max_clients
			@abstract	unsigned int - The maximum number of clients allowed to connect.
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$max_clients</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		max_read
			@abstract	unsigned int - The maximum number of bytes to read from a socket at a single time.
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$max_read</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1024</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		clients
			@abstract	Array - an array of connected clients.
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$clients</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	__construct
			@abstract	Creates the socket and starts listening to it.
			@param		string	- IP Address to bind to, NULL for default.
			@param		int	- Port to bind to
			@result		void
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bind_ip</span><span style="color: #339933;">,</span><span style="color: #000088;">$port</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<a href="http://www.php.net/set_time_limit"><span style="color: #990000;">set_time_limit</span></a><span style="color: #009900;">&#40;</span>0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;ip&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$bind_ip</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;port&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$port</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/socket_create"><span style="color: #990000;">socket_create</span></a><span style="color: #009900;">&#40;</span>AF_INET<span style="color: #339933;">,</span> SOCK_STREAM<span style="color: #339933;">,</span> 0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/socket_bind"><span style="color: #990000;">socket_bind</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;ip&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;port&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Issue Binding&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/socket_getsockname"><span style="color: #990000;">socket_getsockname</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #339933;">,</span><span style="color: #000088;">$bind_ip</span><span style="color: #339933;">,</span><span style="color: #000088;">$port</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/socket_listen"><span style="color: #990000;">socket_listen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Listenting for connections on <span style="color: #006699; font-weight: bold;">{$bind_ip}</span>:<span style="color: #006699; font-weight: bold;">{$port}</span>&quot;</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;">/*!	@function	hook
			@abstract	Adds a function to be called whenever a certain action happens.  Can be extended in your implementation.
			@param		string	- Command
			@param		callback- Function to Call.
			@see		unhook
			@see		trigger_hooks
			@result		void
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> hook<span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #339933;">,</span><span style="color: #000088;">$function</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$command</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtoupper"><span style="color: #990000;">strtoupper</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</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;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</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>
			<span style="color: #000088;">$k</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_search"><span style="color: #990000;">array_search</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$function</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$function</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	unhook
			@abstract	Deletes a function from the call list for a certain action.  Can be extended in your implementation.
			@param		string	- Command
			@param		callback- Function to Delete from Call List
			@see		hook
			@see		trigger_hooks
			@result		void
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> unhook<span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span><span style="color: #000088;">$function</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$command</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtoupper"><span style="color: #990000;">strtoupper</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$k</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_search"><span style="color: #990000;">array_search</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$function</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<a href="http://www.php.net/unset"><span style="color: #990000;">unset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$k</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_search"><span style="color: #990000;">array_search</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_funcs</span><span style="color: #339933;">,</span><span style="color: #000088;">$function</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<a href="http://www.php.net/unset"><span style="color: #990000;">unset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_funcs</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	loop_once
			@abstract	Runs the class's actions once.
			@discussion	Should only be used if you want to run additional checks during server operation.  Otherwise, use infinite_loop()
			@param		void
			@see		infinite_loop
			@result 	bool	- True
		*/</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> loop_once<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// Setup Clients Listen Socket For Reading</span>
			<span style="color: #000088;">$read</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_clients</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</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;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</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;">$read</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">+</span> 1<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Set up a blocking call to socket_select</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/socket_select"><span style="color: #990000;">socket_select</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$read</span><span style="color: #339933;">,</span><span style="color: #000088;">$write</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #000088;">$except</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tv_sec</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//	SocketServer::debug(&quot;Problem blocking socket_select?&quot;);</span>
				<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Handle new Connections</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #339933;">,</span> <span style="color: #000088;">$read</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_clients</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</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;">$temp_sock</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #339933;">;</span>
						<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SocketServerClient<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">master_socket</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">trigger_hooks</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CONNECT&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
					<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_clients</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
					<span style="color: #009900;">&#123;</span>
						SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Too many clients...   &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Handle Input</span>
			<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_clients</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// for each client</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</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;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</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: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span> <span style="color: #000088;">$read</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
					<span style="color: #009900;">&#123;</span>
						<span style="color: #000088;">$input</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/socket_read"><span style="color: #990000;">socket_read</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_read</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
						<span style="color: #009900;">&#123;</span>
							<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">disconnect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span>
						<span style="color: #b1b100;">else</span>
						<span style="color: #009900;">&#123;</span>
							SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$i}</span>@{<span style="color: #006699; font-weight: bold;">$this-&gt;clients</span>[<span style="color: #006699; font-weight: bold;">$i</span>]-&gt;ip} --&gt; <span style="color: #006699; font-weight: bold;">{$input}</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">trigger_hooks</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INPUT&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	disconnect
			@abstract	Disconnects a client from the server.
			@param		int	- Index of the client to disconnect.
			@param		string	- Message to send to the hooks
			@result		void
		*/</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> disconnect<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client_index</span><span style="color: #339933;">,</span><span style="color: #000088;">$message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client_index</span><span style="color: #339933;">;</span>
			SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Client <span style="color: #006699; font-weight: bold;">{$i}</span> from {<span style="color: #006699; font-weight: bold;">$this-&gt;clients</span>[<span style="color: #006699; font-weight: bold;">$i</span>]-&gt;ip} Disconnecting&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">trigger_hooks</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DISCONNECT&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">destroy</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/unset"><span style="color: #990000;">unset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</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;">/*!	@function	trigger_hooks
			@abstract	Triggers Hooks for a certain command.
			@param		string	- Command who's hooks you want to trigger.
			@param		object	- The client who activated this command.
			@param		string	- The input from the client, or a message to be sent to the hooks.
			@result		void
		*/</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> trigger_hooks<span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #339933;">,&amp;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</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;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</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: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hooks</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$command</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$function</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Triggering Hook '<span style="color: #006699; font-weight: bold;">{$function}</span>' for '<span style="color: #006699; font-weight: bold;">{$command}</span>'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$continue</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/call_user_func"><span style="color: #990000;">call_user_func</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$function</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$continue</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	infinite_loop
			@abstract	Runs the server code until the server is shut down.
			@see		loop_once
			@param		void
			@result		void
		*/</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> infinite_loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$test</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">do</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$test</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loop_once</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$test</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;">/*!	@function	debug
			@static
			@abstract	Outputs Text directly.
			@discussion	Yeah, should probably make a way to turn this off.
			@param		string	- Text to Output
			@result		void
		*/</span>
		<span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> debug<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$text}</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</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;">/*!	@function	socket_write_smart
			@static
			@abstract	Writes data to the socket, including the length of the data, and ends it with a CRLF unless specified.
			@discussion	It is perfectly valid for socket_write_smart to return zero which means no bytes have been written. Be sure to use the === operator to check for FALSE in case of an error.
			@param		resource- Socket Instance
			@param		string	- Data to write to the socket.
			@param		string	- Data to end the line with.  Specify a &quot;&quot; if you don't want a line end sent.
			@result		mixed	- Returns the number of bytes successfully written to the socket or FALSE on failure. The error code can be retrieved with socket_last_error(). This code may be passed to socket_strerror() to get a textual explanation of the error.
		*/</span>
		<span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> socket_write_smart<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$sock</span><span style="color: #339933;">,</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span><span style="color: #000088;">$crlf</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt; -- <span style="color: #006699; font-weight: bold;">{$string}</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$crlf</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$string}</span><span style="color: #006699; font-weight: bold;">{$crlf}</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">return</span> <a href="http://www.php.net/socket_write"><span style="color: #990000;">socket_write</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sock</span><span style="color: #339933;">,</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</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;">/*!	@function	__get
			@abstract	Magic Method used for allowing the reading of protected variables.
			@discussion	You never need to use this method, simply calling $server-&gt;variable works because of this method's existence.
			@param		string	- Variable to retrieve
			@result		mixed	- Returns the reference to the variable called.
		*/</span>
		<span style="color: #000000; font-weight: bold;">function</span> <span style="color: #339933;">&amp;</span>__get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/*!	@class		SocketServerClient
		@author		Navarr Barnier
		@abstract	A Client Instance for use with SocketServer
	 */</span>
	<span style="color: #000000; font-weight: bold;">class</span> SocketServerClient
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">/*!	@var		socket
			@abstract	resource - The client's socket resource, for sending and receiving data with.
		 */</span>
		protected <span style="color: #000088;">$socket</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		ip
			@abstract	string - The client's IP address, as seen by the server.
		 */</span>
		protected <span style="color: #000088;">$ip</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		hostname
			@abstract	string - The client's hostname, as seen by the server.
			@discussion	This variable is only set after calling lookup_hostname, as hostname lookups can take up a decent amount of time.
			@see		lookup_hostname
		 */</span>
		protected <span style="color: #000088;">$hostname</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@var		server_clients_index
			@abstract	int - The index of this client in the SocketServer's client array.
		 */</span>
		protected <span style="color: #000088;">$server_clients_index</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	__construct
			@param		resource- The resource of the socket the client is connecting by, generally the master socket.
			@param		int	- The Index in the Server's client array.
			@result		void
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$socket</span><span style="color: #339933;">,</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">server_clients_index</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/socket_accept"><span style="color: #990000;">socket_accept</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$socket</span><span style="color: #009900;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Failed to Accept&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;New Client Connected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/socket_getpeername"><span style="color: #990000;">socket_getpeername</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span><span style="color: #000088;">$ip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ip</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ip</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	lookup_hostname
			@abstract	Searches for the user's hostname and stores the result to hostname.
			@see		hostname
			@param		void
			@result		string	- The hostname on success or the IP address on failure.
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> lookup_hostname<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hostname</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/gethostbyaddr"><span style="color: #990000;">gethostbyaddr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hostname</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*!	@function	destroy
			@abstract	Closes the socket.  Thats pretty much it.
			@param		void
			@result		void
		 */</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> destroy<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<a href="http://www.php.net/socket_close"><span style="color: #990000;">socket_close</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> <span style="color: #339933;">&amp;</span>__get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> __isset<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</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;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div></pre>
<p>class::SocketServer does all the functions necessary for a server.  It binds to the IP address and starts listening to the port.  Its easy to specify a maximum number of clients to allow, and the way its coded makes it easily modified.</p>
<p>Here is an example of a server (using this class) that listens for a user to send a string, and then echoes the reverse of that string back to the user.</p>
<pre><div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
	<span style="color: #666666; font-style: italic;">// This is PHP5 Code, by the way.</span>
&nbsp;
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SocketServer.class.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Include the Class File</span>
	<span style="color: #000088;">$server</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SocketServer<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>31337<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Create a Server binding to the default IP address (null) and listen to port 31337 for connections</span>
	<span style="color: #000088;">$server</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">max_clients</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Allow no more than 10 people to connect at a time</span>
	<span style="color: #000088;">$server</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hook</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CONNECT&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;handle_connect&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Run handle_connect everytime someone connects</span>
	<span style="color: #000088;">$server</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hook</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INPUT&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;handle_input&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Run handle_input whenever text is sent to the server</span>
	<span style="color: #000088;">$server</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">infinite_loop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Run Server Code Until Process is terminated.</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/*
	 * All hooked functions are sent the parameters $server (The server class), $client (the connection), and $input (anything sent, if anything was sent)
	 * You should save the variables $server and $client using an ampersand (&amp;) to make sure they are references to the objects and not duplications.
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> handle_connect<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$server</span><span style="color: #339933;">,&amp;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">socket_write_smart</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;String? &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Outputs 'String? ' without a Line Ending</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> handle_input<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$server</span><span style="color: #339933;">,&amp;</span><span style="color: #000088;">$client</span><span style="color: #339933;">,</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$trim</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Trim the input, Remove Line Endings and Extra Whitespace.</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/strtolower"><span style="color: #990000;">strtolower</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$trim</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;quit&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// User Wants to quit the server</span>
		<span style="color: #009900;">&#123;</span>
			SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">socket_write_smart</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Oh... Goodbye...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Give the user a sad goodbye message, meany!</span>
			<span style="color: #000088;">$server</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">disconnect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">server_clients_index</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Disconnect this client.</span>
			<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Ends the function</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strrev"><span style="color: #990000;">strrev</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$trim</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Reverse the String</span>
&nbsp;
		SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">socket_write_smart</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Send the Client back the String</span>
		SocketServer<span style="color: #339933;">::</span><span style="color: #004000;">socket_write_smart</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">socket</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;String? &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Request Another String</span>
	<span style="color: #009900;">&#125;</span></pre></div></div></pre>
<p>In essence, this class allows you to handle sockets in PHP.  <strong><em>Beautifully</em></strong> handle sockets in PHP, that is.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/NtmO9kED7FpY_jjR4YqnTef9OzU/0/da"><img src="http://feedads.g.doubleclick.net/~a/NtmO9kED7FpY_jjR4YqnTef9OzU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/NtmO9kED7FpY_jjR4YqnTef9OzU/1/da"><img src="http://feedads.g.doubleclick.net/~a/NtmO9kED7FpY_jjR4YqnTef9OzU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/wBCa8-fsXgU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/07/how-to-create-a-socket-server-in-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/07/how-to-create-a-socket-server-in-php.html</feedburner:origLink></item>
		<item>
		<title>Magical Typesetting in PHP</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/C0O7Mi-snzM/magical-typesetting-in-php.html</link>
		<comments>http://tech.navarr.me/2010/06/magical-typesetting-in-php.html#comments</comments>
		<pubDate>Mon, 28 Jun 2010 10:32:39 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[class::GenericVariable]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[typesetting]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/06/magical-typesetting-in-php.html</guid>
		<description><![CDATA[So, well working for Route 50 I came up with a fantastic idea for “typesetting” that well exceeded the norm.  Something we constantly have issues with is what type of string was sent to MySQL originally (some of us have different conventional ideas about where escaping HTML should be located.) as well as outputting that [...]]]></description>
			<content:encoded><![CDATA[<p>So, well working for <a href="http://route50.net/" target="_blank">Route 50</a> I came up with a fantastic idea for “typesetting” that well exceeded the norm.  Something we constantly have issues with is what type of string was sent to MySQL originally (some of us have different conventional ideas about where escaping HTML should be located.) as well as outputting that string in its correct format.</p>
<p>Me, with my fantastic idea, came up with a couple variables classes that I put in a file named <a href="http://gist.github.com/451216">class_typesetting.php</a>.  The version on gist.github is slightly modified from the original version on the server.</p>
<p>It creates three classes, GenericVariable, String, and Number.  So far we haven’t used GenericVariable, but since the introduction of the classes I’ve taken it upon myself to introduce them to any new code I write.  When we create Core v5 (which will Objectify everything) strings taken from SQL will automatically be re-stored as String class variables.</p>
<p>First, lets examine some useful functionality.</p>
<pre><div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> String<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span>“title”<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// &lt;strong&gt;Hello 'World'&lt;/strong&gt;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
HTML Output: <span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">html</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> (&amp;lt;strong&amp;gt;Hello 'World'&amp;lt;/strong&amp;gt;)
Text Output: <span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> (Hello 'World')
SQL Output: <span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">sql</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> (&lt;strong&gt;Hello \'World\'&lt;/strong&gt;)
HTML Attribute Output: <span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$title</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">html_attr</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>(&amp;lt;strong&amp;gt;Hello &amp;#039;World&amp;#039;&amp;lt;/strong&amp;gt;)</pre></div></div></pre>
<p>This allows for quick and easy access to the variables without having to worry about escaping them.</p>
<p>I recommend you hit the download link (class_typesetting.php) and play around with it.  Tell me about anything that’s not working correctly and if possible implement it in your future code.  (This means I’m putting this code in the “Public Domain”).</p>

<p><a href="http://feedads.g.doubleclick.net/~a/bUf2lRBG0ljzYYiBeVh-mh7BCfI/0/da"><img src="http://feedads.g.doubleclick.net/~a/bUf2lRBG0ljzYYiBeVh-mh7BCfI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/bUf2lRBG0ljzYYiBeVh-mh7BCfI/1/da"><img src="http://feedads.g.doubleclick.net/~a/bUf2lRBG0ljzYYiBeVh-mh7BCfI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/C0O7Mi-snzM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/06/magical-typesetting-in-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/06/magical-typesetting-in-php.html</feedburner:origLink></item>
		<item>
		<title>Closing Desktop Notifications on a Timer</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/uGVXqGAOm0k/closing-desktop-notifications-on-a-timer.html</link>
		<comments>http://tech.navarr.me/2010/05/closing-desktop-notifications-on-a-timer.html#comments</comments>
		<pubDate>Tue, 11 May 2010 22:42:17 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/05/closing-desktop-notifications-on-a-timer.html</guid>
		<description><![CDATA[So, one of the few things about Chrome’s desktop notifications I’ve been trying to figure out is how to close them on a timer, and it finally came to me. This timer will only activate when the notification is opened, and will close the notification even if the page that originally spawned it has been [...]]]></description>
			<content:encoded><![CDATA[<p>So, one of the few things about Chrome’s desktop notifications I’ve been trying to figure out is how to close them on a timer, and it finally came to me.</p>
<p>This timer will only activate when the notification is opened, and will close the notification even if the page that originally spawned it has been closed.</p>
<p>Create and Show a new HTMLNotification.</p>
<pre><div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span>
	<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span>
		<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Notification Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>
		<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
			body,body* { font-family: sans-serif; font-size: 10pt; }
			h1 { font-family: sans-serif; margin: 0; padding: 0; font-size: 12pt; font-weight: bold; }
			p { margin: 0; padding: 0; }
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span>
	<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;setTimeout(self.close,5000)&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span>Notification Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span>
		<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>Notification Text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></pre></div></div></pre>
<p>That will close the window after five seconds and will look just like a normal notification! <img src='http://tech.navarr.me/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>What I learned is: <strong>Notification Windows respond to the javascript method self.close()</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/g7lSd9q6nck8u6MBeBYWLItpLEw/0/da"><img src="http://feedads.g.doubleclick.net/~a/g7lSd9q6nck8u6MBeBYWLItpLEw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/g7lSd9q6nck8u6MBeBYWLItpLEw/1/da"><img src="http://feedads.g.doubleclick.net/~a/g7lSd9q6nck8u6MBeBYWLItpLEw/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/uGVXqGAOm0k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/05/closing-desktop-notifications-on-a-timer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/05/closing-desktop-notifications-on-a-timer.html</feedburner:origLink></item>
		<item>
		<title>Stop, @HotDogCollars.  You’re doing it wrong.</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/DGm_FE-nJHs/stop-hotdogcollars-youre-doing-it-wrong.html</link>
		<comments>http://tech.navarr.me/2010/05/stop-hotdogcollars-youre-doing-it-wrong.html#comments</comments>
		<pubDate>Thu, 06 May 2010 09:42:39 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[Customer Service]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[doing it wrong]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[HotDogCollars.com]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Web 3.0]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/05/stop-hotdogcollars-youre-doing-it-wrong.html</guid>
		<description><![CDATA[Man oh man oh man.&#160; To be honest, this is something @Scobleizer or @davewiner should cover/bitch-about, not me.&#160; You’ve got a local business in Florida, trying to do the Web 3.0 thing, but you know what?&#160; They’re doing it wrong. Go ahead, look at their twitter page (but only for a second).&#160; You notice how [...]]]></description>
			<content:encoded><![CDATA[<p>Man oh man oh man.&#160; To be honest, this is something @Scobleizer or @davewiner should cover/bitch-about, not me.&#160; You’ve got a local business in Florida, trying to do the Web 3.0 thing, but you know what?&#160; They’re <strong>doing it wrong</strong>.</p>
<p>Go ahead, look at their twitter page (but only for a second).&#160; You notice how all of their posts are from Facebook, and only contain links?&#160; Yeah.&#160; They’re doing Twitter wrong (but I have many, many more beefs with them than just their twitter page).</p>
<p>First, let me briefly describe my situation with these people.&#160; I purchased something they said they could do.&#160; Turns out they couldn’t do it (after not replying for like a month or two).&#160; I ask for a refund in that case.&#160; Nothing happens, none of my emails get returned (for like ANOTHER month or two).&#160; I write a horrible review for the company on Facebook (wasn’t the only one), consider reporting them to the BBB, etc.&#160; Nothing happens (for like another month or so).&#160; I get an email from Facebook, they commented on my review, I immediately got help via email and I got my return via Paypal.</p>
<p>Then, I go back to update the review I gave them (I was going to add a star, to give them 2/5 for at least paying attention), and I found out something that made me wish I could give them 0/5 stars.</p>
<p><strong>The Facebook Review Tab had been REMOVED</strong>.</p>
<p>This company went out of its way to disable user-created discussions in the discussion tab, remove the review tab, and block users from posting anything on their wall.</p>
<p><strong>Please, Stop.&#160; You’re doing it WRONG</strong>.</p>
<p>I don’t know what else to say.. how could you possibly be doing something so horribly wrong?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/SVdGY5xUra3La8Qd4-DTv9qk0yI/0/da"><img src="http://feedads.g.doubleclick.net/~a/SVdGY5xUra3La8Qd4-DTv9qk0yI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SVdGY5xUra3La8Qd4-DTv9qk0yI/1/da"><img src="http://feedads.g.doubleclick.net/~a/SVdGY5xUra3La8Qd4-DTv9qk0yI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/DGm_FE-nJHs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/05/stop-hotdogcollars-youre-doing-it-wrong.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/05/stop-hotdogcollars-youre-doing-it-wrong.html</feedburner:origLink></item>
		<item>
		<title>Open Letter to Dave Winer</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/UsAeL271u2s/open-letter-to-dave-winer.html</link>
		<comments>http://tech.navarr.me/2010/05/open-letter-to-dave-winer.html#comments</comments>
		<pubDate>Sun, 02 May 2010 22:00:17 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/05/open-letter-to-dave-winer.html</guid>
		<description><![CDATA[I know you invented RSS and all that, but please, please stop raping your feed. I do not like getting this every couple of weeks, or days.. I don’t know, I have no concept of time, but this isn’t the first time its happened. Please?]]></description>
			<content:encoded><![CDATA[<p>I know you invented RSS and all that, but please, <strong><em>please</em></strong> stop raping your feed.</p>
<p>I do not like getting this every couple of weeks, or days.. I don’t know, I have no concept of time, but this isn’t the first time its happened.</p>
<p><a href="http://tech.gtaero.net/wp-content/uploads/2010/05/image.png" rel="lightbox[456]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://tech.gtaero.net/wp-content/uploads/2010/05/image_thumb.png" width="500" height="200" /></a> </p>
<p><strong>Please</strong>?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/C3p9eF0FKUrnBSmcUadmK8lv24s/0/da"><img src="http://feedads.g.doubleclick.net/~a/C3p9eF0FKUrnBSmcUadmK8lv24s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/C3p9eF0FKUrnBSmcUadmK8lv24s/1/da"><img src="http://feedads.g.doubleclick.net/~a/C3p9eF0FKUrnBSmcUadmK8lv24s/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/UsAeL271u2s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/05/open-letter-to-dave-winer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/05/open-letter-to-dave-winer.html</feedburner:origLink></item>
		<item>
		<title>Twitter Annotation Proposal – Image</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/_tp_y1BYQZc/twitter-annotation-proposal-image.html</link>
		<comments>http://tech.navarr.me/2010/04/twitter-annotation-proposal-image.html#comments</comments>
		<pubDate>Fri, 23 Apr 2010 01:09:24 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[Twitter]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/04/twitter-annotation-proposal-image.html</guid>
		<description><![CDATA[This is a proposal for a twitter annotation that I hope to be blessed by both the development community and twitter itself. Image Namespace Images are something commonly shared throughout twitter.&#160; Something that would be fantastically idealistic would be embedding image data into twitter annotations. Due to constraints, images should be resized to a lower-quality [...]]]></description>
			<content:encoded><![CDATA[<p>This is a proposal for a twitter annotation that I hope to be blessed by both the development community and twitter itself.</p>
<h3>Image Namespace</h3>
<p>Images are something commonly shared throughout twitter.&#160; Something that would be fantastically idealistic would be embedding image data into twitter annotations.</p>
<p>Due to constraints, images should be resized to a lower-quality “preview”.&#160; Possibly VGA or so?&#160; A link to a privately hosted image should also be available.</p>
<p>Using the current preview information supplied by the twitter development team, I imagine that it would go something like this:</p>
<pre><div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="javascript" style="font-family:monospace;"><span style="color: #3366CC;">&quot;image&quot;</span><span style="color: #339933;">:</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;preview&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;data here.. base64 etc.&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;preview_encode&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;base64&quot;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Or whatever else floats your boat.  &quot;bin&quot; or &quot;binary&quot; for raw data.</span>
        <span style="color: #3366CC;">&quot;full_src&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://example.org/link/to/image.jpg&quot;</span>
<span style="color: #009900;">&#125;</span></pre></div></div></pre>
<p>Any additional thoughts on other information that should be included?&#160; Maybe a title and description, or is that not needed?&#160; Please, leave all of your thoughts and ideas in the comments!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/yYzvV7QCu-hhOSYLo1Sdpt9GhbY/0/da"><img src="http://feedads.g.doubleclick.net/~a/yYzvV7QCu-hhOSYLo1Sdpt9GhbY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/yYzvV7QCu-hhOSYLo1Sdpt9GhbY/1/da"><img src="http://feedads.g.doubleclick.net/~a/yYzvV7QCu-hhOSYLo1Sdpt9GhbY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/_tp_y1BYQZc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/04/twitter-annotation-proposal-image.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/04/twitter-annotation-proposal-image.html</feedburner:origLink></item>
		<item>
		<title>Using Google Voice with Outlook’s Dialer</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/jjKNEQsrcxM/using-google-voice-with-outlooks-dialer.html</link>
		<comments>http://tech.navarr.me/2010/04/using-google-voice-with-outlooks-dialer.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 02:58:05 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[Google Voice]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[office]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/04/using-google-voice-with-outlooks-dialer.html</guid>
		<description><![CDATA[Microsoft Outlook has this very nifty feature where you can connect your computer to the phone line and use your Outlook Contact List to instantly dial someone’s number.&#160; Of course, when they created this they needed to add support for using a calling card, as long distance in the same country hadn’t even begun to [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft Outlook has this very nifty feature where you can connect your computer to the phone line and use your Outlook Contact List to instantly dial someone’s number.&#160; Of course, when they created this they needed to add support for using a calling card, as long distance in the same country hadn’t even begun to be free.</p>
<p>Now if you use Google Voice, you can use this to your advantage with the simple addition of just a few seconds to the call.</p>
<p>Continue Reading for Instructions on how to Outlook up to dial through Google Voice</p>
<p> <span id="more-447"></span>
<p>First, you’ll want to go to your contacts and open up the Calling Dialogue.&#160; Do this by clicking <strong>More</strong> &gt; <strong>Call</strong> &gt; <strong>New Call…</strong></p>
<p><a href="http://tech.gtaero.net/wp-content/uploads/2010/04/image2.png" rel="lightbox[447]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image_thumb.png" width="500" height="377" /></a> </p>
<p>You should get a dialogue that looks something like:</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image3.png" width="401" height="196" /> </p>
<p>You’ll notice immediately that it has been around for ages.&#160; What we want, though, is “Dialing Properties.”&#160; Once that pops up, you’ll (probably) want to create a <strong>New…</strong> location.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image4.png" width="414" height="461" /> </p>
<p>Name it something like “Everywhere” and give it the area code “<strong>999</strong>” or another area code that is <u>never</u> used.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image5.png" width="414" height="521" /> </p>
<p>Now that that little bit is out of the way, we can get to actually creating the dialer.&#160; Go to the <strong>Calling Card</strong> tab and click <strong>New…</strong></p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image6.png" width="414" height="521" /> </p>
<p>Give it a name like “Google Voice.”&#160; For your account number, enter your ten digit Google Voice number, and for your PIN, enter.. your Pin.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image7.png" width="414" height="461" /> </p>
<p>Go to the <strong>Long Distance</strong> tab and enter the following rules:</p>
<ol>
<li><strong>Dial the account number</strong>.&#160; (Button: <strong>Account Number</strong>)</li>
<li><strong>Wait for 4 seconds</strong>. (Button: <strong>Wait for Prompt…</strong>, click “Wait for a specific length of time:” and then enter the number 4)</li>
<li><strong>Dial *</strong> (Button: <strong>Specify Digits…</strong>, enter the asterisk)</li>
<li><strong>Wait for 4 seconds.</strong></li>
<li><strong>Dial the PIN number.</strong> (Button: <strong>PIN</strong>)</li>
<li><strong>Wait for 4 seconds</strong>.</li>
<li><strong>Dial 2</strong> (Button: <strong>Specify Digits…</strong>, enter the number 2)</li>
<li><strong>Wait for 2 seconds.</strong> (Button: <strong>Wait for Prompt…</strong>, click “Wait for a specific length of time:” and then enter the number 2)</li>
<li><strong>Dial the area code and number.</strong> (Button: <strong>Destination Number…</strong>, make sure “<strong>Dial the area code</strong>” is selected and “<strong>Dial the country/region code</strong>” is not.)</li>
<li><strong>Dial #</strong> (Button: <strong>Specify Digits…</strong>, enter the pound sign: #)</li>
</ol>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image8.png" width="414" height="461" /> </p>
<p>Click <strong>OK</strong> and make sure that <strong>Google Voice</strong> (or whatever you named it) is selected as the calling card.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="" alt="" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image9.png" width="414" height="521" /> </p>
<p>Click <strong>OK</strong>, <strong>OK</strong>, and then feel free to make any calls you want using your Google Voice number.&#160; <img src='http://tech.navarr.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><a href="http://feedads.g.doubleclick.net/~a/rE5GD1Gu0neLvoJM_0_SD0pV7f4/0/da"><img src="http://feedads.g.doubleclick.net/~a/rE5GD1Gu0neLvoJM_0_SD0pV7f4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/rE5GD1Gu0neLvoJM_0_SD0pV7f4/1/da"><img src="http://feedads.g.doubleclick.net/~a/rE5GD1Gu0neLvoJM_0_SD0pV7f4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/jjKNEQsrcxM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/04/using-google-voice-with-outlooks-dialer.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/04/using-google-voice-with-outlooks-dialer.html</feedburner:origLink></item>
		<item>
		<title>Features Wanted in Skype</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/Pw_-UNR53xU/featured-wanted-in-skype.html</link>
		<comments>http://tech.navarr.me/2010/04/featured-wanted-in-skype.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 02:28:58 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[Skype]]></category>
		<category><![CDATA[Google Voice]]></category>
		<category><![CDATA[modem]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/04/featured-wanted-in-skype.html</guid>
		<description><![CDATA[I realized there are some neat little features I would love to see in Skype (while playing around with Microsoft Outlook and getting it to call out using Google Voice, I’ll blog about that next). Calls Out Using Modem Doesn’t Skype do some fantastic Skype-Out thing where you can even use a specific number as [...]]]></description>
			<content:encoded><![CDATA[<p>I realized there are some neat little features I would love to see in Skype (while playing around with Microsoft Outlook and getting it to call out using Google Voice, I’ll blog about that next).</p>
<h3>Calls Out Using Modem</h3>
<p>Doesn’t Skype do some fantastic Skype-Out thing where you can even use a specific number as a calling card and call out using it?&#160; A whole crapload of notebooks and desktops still ship with modems, why not utilize it!&#160; If you don’t have a connection to the net (or you’re just crazy), you could call out using a Skype-Out Call-In Number!&#160; Wouldn’t that be AWESOME?</p>
<h4>Calls Out with Calling Card through Modem</h4>
<p>Yeah, yeah, companies don’t like competition or whatnot, but if the previous is supported, why not spice it up a little and allow us to use a different calling card through the settings?&#160; That would allow Google Voice users to make outbound calls using Google Voice through Skype, and that would just be AWESOME.</p>
<h3>Answering Calls Through Modem</h3>
<p>Is your phone ringing?&#160; Yeah, don’t you wish you could pick it up using Skype?&#160; All it has to do is learn to speak through the modem and BABOOSH, you can now answer your landline ON SKYPE (GOOGLE VOICE MAKES THIS MORE AWESOME).</p>
<h3>Contact Synchronization with Google</h3>
<p>Come ON.&#160; <strong>EVERYTHING</strong> needs this.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/whYkknzjM6L4K1LcdAdRM7qQEPU/0/da"><img src="http://feedads.g.doubleclick.net/~a/whYkknzjM6L4K1LcdAdRM7qQEPU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/whYkknzjM6L4K1LcdAdRM7qQEPU/1/da"><img src="http://feedads.g.doubleclick.net/~a/whYkknzjM6L4K1LcdAdRM7qQEPU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/Pw_-UNR53xU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/04/featured-wanted-in-skype.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/04/featured-wanted-in-skype.html</feedburner:origLink></item>
		<item>
		<title>Why SuperTweets won’t kill URL Shorteners</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/t7dfmRvWndU/why-supertweets-wont-kill-url-shorteners.html</link>
		<comments>http://tech.navarr.me/2010/04/why-supertweets-wont-kill-url-shorteners.html#comments</comments>
		<pubDate>Wed, 14 Apr 2010 19:38:37 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[bit.ly]]></category>
		<category><![CDATA[supertweets]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[url shorteners]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/04/why-supertweets-wont-kill-url-shorteners.html</guid>
		<description><![CDATA[Now, the title of this blog post makes it sound like I’m going to write an essay about why SuperTweets (and the probability of them having a URL metadata for tweets) will not be killing URL Shorteners like j.mp and bit.ly anytime soon. 1) URL Shorteners Keep You Safe One of the things URL shorteners [...]]]></description>
			<content:encoded><![CDATA[<p>Now, the title of this blog post makes it sound like I’m going to write an essay about why SuperTweets (and the probability of them having a URL metadata for tweets) will not be killing URL Shorteners like j.mp and bit.ly anytime soon.</p>
<h3>1) URL Shorteners Keep You Safe</h3>
<p>One of the things URL shorteners do now is they keep you safe from malicious websites.&#160; You can preview the site you are visiting, and if its determined to be delicious the short URL will either be deleted or blocked or a warning will be shown, letting you know it is no longer safe to visit that URL.</p>
<h3>2) URL Shorteners are Branded</h3>
<p>All I really have to say here is “Bit.ly Pro”&#160; URL Shorteners now have custom branding, so it makes it even easier to send people to your website or promote your brand on twitter by including the link in the text.</p>
<h3>3) URL Shorteners are Easy to Remember</h3>
<p>When they are used correctly.&#160; Services like bit.ly allow you to give a custom name to your short link.&#160; This is especially useful in media such as Television or Print: <a href="http://j.mp/cnn-transgender">http://j.mp/cnn-transgender</a> is much easier to remember and type than <a href="http://www.cnn.com/2010/LIVING/04/14/transgender.irpt/index.html?hpt=C1">www.cnn.com/2010/LIVING/04/14/transgender.irpt/index.html?hpt=C1</a></p>
<p>With even just these three simple reasons in mind, it is very clear to me that URL shorteners will not be dying anytime soon, no matter how much metadata you can attach to tweets.&#160; I’m not even sure they’re bad for the internet, anymore.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/BErY__qg5YS9jlHGF0ChGkebZjA/0/da"><img src="http://feedads.g.doubleclick.net/~a/BErY__qg5YS9jlHGF0ChGkebZjA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BErY__qg5YS9jlHGF0ChGkebZjA/1/da"><img src="http://feedads.g.doubleclick.net/~a/BErY__qg5YS9jlHGF0ChGkebZjA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/t7dfmRvWndU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/04/why-supertweets-wont-kill-url-shorteners.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/04/why-supertweets-wont-kill-url-shorteners.html</feedburner:origLink></item>
		<item>
		<title>Oh Apple, You Amuse Me</title>
		<link>http://feedproxy.google.com/~r/navarrstech/~3/q4Kkc_Q2iLE/oh-apple-you-amuse-me.html</link>
		<comments>http://tech.navarr.me/2010/04/oh-apple-you-amuse-me.html#comments</comments>
		<pubDate>Thu, 08 Apr 2010 19:39:18 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Microsoft Store]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[blatant ripoff]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone game center]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2010/04/oh-apple-you-amuse-me.html</guid>
		<description><![CDATA[Apple iPhone Game Center Icon vs. Microsoft Store Logo: &#160; Oh Apple, has anyone told you lately that you’re CRAZY?]]></description>
			<content:encoded><![CDATA[<p align="center">Apple iPhone Game Center Icon vs. Microsoft Store Logo:</p>
<p align="center"><img style="display: inline" title="image" alt="image" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image.png" width="118" height="133" /><img style="display: inline" title="image" alt="image" src="http://tech.gtaero.net/wp-content/uploads/2010/04/image1.png" width="133" height="133" />&#160; </p>
<p align="left">Oh Apple, has anyone told you lately that you’re CRAZY?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/K72D7yhKUbNmLwbQb_Fi0WH1voc/0/da"><img src="http://feedads.g.doubleclick.net/~a/K72D7yhKUbNmLwbQb_Fi0WH1voc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/K72D7yhKUbNmLwbQb_Fi0WH1voc/1/da"><img src="http://feedads.g.doubleclick.net/~a/K72D7yhKUbNmLwbQb_Fi0WH1voc/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/navarrstech/~4/q4Kkc_Q2iLE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/04/oh-apple-you-amuse-me.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://tech.navarr.me/2010/04/oh-apple-you-amuse-me.html</feedburner:origLink></item>
	</channel>
</rss>
