<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Narnio&#187; google</title>
	<atom:link href="http://www.narnio.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.narnio.com</link>
	<description>A day in the life of a software engineer</description>
	<lastBuildDate>Sat, 28 Aug 2010 16:18:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The HTC Desire indepth</title>
		<link>http://www.narnio.com/2010/08/28/the-htc-desire-indepth/</link>
		<comments>http://www.narnio.com/2010/08/28/the-htc-desire-indepth/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 16:18:37 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[HTC Desire]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=432</guid>
		<description><![CDATA[In a previous post I said I recently got a new phone, the HTC Desire. But since I only had it very briefly I felt it wasn&#8217;t the time yet to write about the phone itself. Well know I&#8217;ve been playing with it for more then a week so it&#8217;s time to write some small [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.narnio.com/wp-content/uploads/2010/08/htc-desire-vodafone.jpg"><img style="margin-left: 4px; margin-bottom: 2px; border: 1px dashed #000000; float: right;" title="HTC Desire" src="http://www.narnio.com/wp-content/uploads/2010/08/htc-desire-vodafone-e1283010973305.jpg" alt="" width="282" height="478" /></a>In a previous post I said I recently got a new phone, the HTC Desire. But since I only had it very briefly I felt it wasn&#8217;t the time yet to write about the phone itself. Well know I&#8217;ve been playing with it for more then a week so it&#8217;s time to write some small article about it.</p>
<p>So I&#8217;ve been using HTC phones for several years now and so far I&#8217;ve liked every single phone I&#8217;ve had. But the Desire was my switch from Windows Mobile to the Android platform, and I was very worried about the switch to say the least.</p>
<h2>First impression of the Desire</h2>
<p>After switching on the phone for the first time I went through the setup procedure, which is as simple as 1, 2, 3. So thank god for that, it&#8217;s a huge step up from Windows Mobile 5.</p>
<p>I have to give HTC one thing, the phone response very well to any time you touch the screen. It&#8217;s probably the capacitive screen, but its a whole lot better then what I was used to.  Just after first boot you will probably play around a little with the widgets that are included.</p>
<p>As the Sense interface gives you 7 different tabs that you can put widgets on it will take you some time to configure it to your likings. Which is as much a blessing as a curse, especially in when you are just using the phone for the first time. Luckily the phone comes with several presets for the Sense interface.</p>
<p>My biggest concern was migrating all my data from Windows Mobile to the Android platform. And unfortunately my worries where right. So Google step up to the plate and make migrating from different phone platforms easier. It&#8217;s impossible to migrate text messages or call history without doing a lot of manual work.</p>
<h2>The good the bad and the ugly</h2>
<p>So what&#8217;s up with this phone. Is it a good thing to buy or good gift to get <img src='http://www.narnio.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Well it sorta depends on what you are expecting. If you want a phone that gives you a lot of access to your social networks, then yeah it might be something for you. If you want something that just enables you to call and send text message, then please don&#8217;t waste your money on the Desire.  It&#8217;ll do the job but at a high price.</p>
<p>Having said that here are some of the pro&#8217;s and con&#8217;s of the phone:</p>
<table width="100%">
<thead>
<tr>
<td style="text-align: left;"><strong>Pro&#8217;s</strong></td>
<td style="text-align: left;"><strong>Con&#8217;s</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td width="50%" valign="top">
<ul>
<li>Very responsive to touch</li>
<li>Well thought out interface</li>
<li>Good build quality</li>
<li>Tons of applications available for Android</li>
<li>Automatic updating over the air</li>
</ul>
</td>
<td width="50%" valign="top">
<ul>
<li>Seems to loose 3G connection randomly, and won&#8217;t reconnect automatically</li>
<li>Very, very expensive at 400+ bucks</li>
<li>Crappy FriendStream widget of HTC</li>
</ul>
</td>
</tr>
</tbody>
</table>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2010/08/28/the-htc-desire-indepth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google found a way to crash Internet Explorer</title>
		<link>http://www.narnio.com/2008/12/07/google-found-a-way-to-crash-internet-explorer/</link>
		<comments>http://www.narnio.com/2008/12/07/google-found-a-way-to-crash-internet-explorer/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 13:23:55 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=236</guid>
		<description><![CDATA[Ok today I came accross something really weird. I was trying to find information on setting up my own mail server using PostFix. No problem really, just used Google search to find the information.
The strange crashes started happening once I found a page that didn&#8217;t contain the information I needed and I hit the back [...]]]></description>
			<content:encoded><![CDATA[<p>Ok today I came accross something really weird. I was trying to find information on setting up my own mail server using PostFix. No problem really, just used Google search to find the information.</p>
<p>The strange crashes started happening once I found a page that didn&#8217;t contain the information I needed and I hit the back button. Every single time I did this Google crashed my tab with some type of cross scripting warning. Even when IE tried to recover the tab it crashed again. After the second crash IE just said, slightly paraphrased, &#8216;f*ck it the website keeps crashing go somewhere else instead!&#8217;.</p>
<p>So here is the steps to reproduce (as it crashed every single time):</p>
<ul>
<li>Use Internet Explorer 8</li>
<li>Have multiple tabs open, I had at least two in a google search result</li>
<li>I was logged into personalized search, don&#8217;t know if it is relevant but hey you never know</li>
<li>Click on of the search results</li>
<li>Hit the back button, or the backspace key</li>
<li>Presto crasho.</li>
</ul>
<p>Always fun to see how some javascript can crash a Internet Explorer tab. I am at least presuming it is caused by javascript.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2008/12/07/google-found-a-way-to-crash-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Doesn&#8217;t Like .0 extension</title>
		<link>http://www.narnio.com/2008/06/14/google-doesnt-like-0-extension/</link>
		<comments>http://www.narnio.com/2008/06/14/google-doesnt-like-0-extension/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 13:38:03 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[Website optimization]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=200</guid>
		<description><![CDATA[We all know that search engines have strange quirkes when it comes to filtering the indexes they have. Well very recently it came to my attention that Google has added some new extensions to the filter list.
We already new that files with .exe, .dll and .lib were being filtered from the search results. Which I [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that search engines have strange quirkes when it comes to filtering the indexes they have. Well very recently it came to my attention that Google has added some new extensions to the filter list.</p>
<p>We already new that files with .exe, .dll and .lib were being filtered from the search results. Which I think is a good thing, as it protects the visitors from potential harm. But just a few days back I got word that Google is now also banning or blocking pages ending on .0.</p>
<p>Some examples are:</p>
<ul>
<li>The wikipedia page Web 2.0 (http://en.wikipedia.org/wiki/Web_2.0) ending in .0 is no longer showing up in the search results, rather the page ending in 2 (http://en.wikipedia.org/wiki/Web_2).</li>
<li>The Seomoz page for Web 2.0 has disappeared from the results. Instead the summary page is listed.</li>
</ul>
<p>After some chatter about the issue around the internet and blogs Matt Cutts wrote a quick entry in his blog as to why they have been removed from the search results. Read it at <a href="http://www.mattcutts.com/blog/dont-end-your-urls-with-exe/">http://www.mattcutts.com/blog/dont-end-your-urls-with-exe/</a>.</p>
<p>So for know try to avoid ending Url&#8217;s with .0 or any of the already known blocked extensions.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2008/06/14/google-doesnt-like-0-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a PHP search indexer</title>
		<link>http://www.narnio.com/2008/02/12/building-a-php-search-indexer/</link>
		<comments>http://www.narnio.com/2008/02/12/building-a-php-search-indexer/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 15:18:32 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Building One]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.narnio.com/2008/02/12/building-a-php-search-indexer/</guid>
		<description><![CDATA[I&#8217;ve been working on a demo website called MovServDex for quite some years now. I&#8217;m calling it a demo website, but it&#8217;s really a fully featured website on TV shows and movies. In the latest version I have decided to add a search engine. In this post I&#8217;ll shed some light on how you can [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a demo website called <a href="http://www.movservdex.com">MovServDex</a> for quite some years now. I&#8217;m calling it a demo website, but it&#8217;s really a fully featured website on TV shows and movies. In the latest version I have decided to add a search engine. In this post I&#8217;ll shed some light on how you can create a PHP script that will &#8216;crawl&#8217; the web for pages.</p>
<p><strong>Before I continue please note that this is not meant to be a replacement for a real search engine like Google. But it may be useful for you to use on your own website.</strong></p>
<p><span id="more-176"></span></p>
<p>One of the first things you must do is structure how you want to store the data you index from the web. I won&#8217;t go into much detail on this right now since that&#8217;s probably a university study on it&#8217;s own. But I will go into detail on:</p>
<ul>
<li>How to feed pages into an existing index</li>
<li>Extracting useful links from indexed pages</li>
<li>Extracting nice information on the page like title, description, etc</li>
<li>Filtering out useless content of pages</li>
</ul>
<h2>Feeding new pages into the index</h2>
<p>The simplest thing should be the manually entering of new pages to index. But if you&#8217;re anything like me then you can make something simple something complex. What you need to consider is how you want to do this. Do you want the engine to index only the given page, or perhaps pages it links to as well.</p>
<p>If you have these two possibilities then your engine will look something like this:</p>
<pre class="brush: php">class Engine {
  function indexPage($page_url, $subpages_included = false)
  {}
}</pre>
<p>Looks simple doesn&#8217;t it, well that&#8217;s cause so far it is. In the next couple of paragraphs I will slowly keep adding code to this class to show how I build my search engine. <img src='http://www.narnio.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So let&#8217;s start by adding the first feature that you will need to have. When adding a new page to the index you will need to get that page. That&#8217;s the first thing we are going to be building. Something I build to prevent accessing non existing Urls is a checker that verifies if a page exists. I do this as follows:</p>
<pre class="brush: php">function verifyUrl($page_url)
{</pre>
<p>Open a connection to the Url provided by the engine (user)</p>
<pre class="brush: php">
   $real_url = parse_url($page_url);
   $use_port = isset($real_url[&#039;port&#039;]) ? $real_url[&#039;port&#039;] : 80;
   $socket = fsockopen($real_url[&#039;host&#039;], $use_port, $errno, $errstr, 30);
</pre>
<p>If we successfully opened a connection sent the url we need to the webserver.</p>
<pre class="brush: php">
   if ($socket){
     $sent_header = &quot;HEAD &quot;. @$real_url[&#039;path&#039;] .
       &quot; HTTP/1.0\r\nHost: &quot;. @$real_url[&#039;host&#039;]&quot;\r\n\r\n&quot;;
     fputs($socket, $sent_header);
</pre>
<p>As long as we don&#8217;t have the header information we need from the webserver we will keep reading the response.</p>
<pre class="brush: php">
     while (!feof($socket)) {
       if ($rec_header = trim(fgets($socket, 1024))) {
         $ar = explode(&#039;:&#039;, $rec_header);
         $key = array_shift($ar);
         if ($key == $rec_header)
          $headers[] = $header;
         else
          $headers[$key] = substr($rec_header, strlen($key)+2);
         unset($key);
       }
     }
  }
</pre>
<p>Check if the response from the server was that the page actually exists and is OK.</p>
<pre class="brush: php">
  if (stripos($headers[0], &#039;200 OK&#039;)&gt;0)
    return true;
  return false;
}
</pre>
<p>Now that we have a function to check if Url&#8217;s exist and don&#8217;t return a 404 (meaning &#8216;uh I lost the page&#8217;) we can start writing the function that fetches the actual content of the url.</p>
<p>Reading the content of the url is pretty simple just by adding the following code:</p>
<pre class="brush: php">function getUrlContents($url_string)
{</pre>
<p>Prevent the fetching of none existing pages so the index never gets polluted.</p>
<pre class="brush: php">  if (!$this-&gt;verifyUrl($url_string))
     return;</pre>
<p>Now fetch the content and strip some basic information from it so we have some details on the page.</p>
<pre class="brush: php">
  $page_content = @file_get_contents($url_string, &#039;rb&#039;);
  if (!$url_content) return;

  $urls =array();
  @preg_match_all(&#039;/&lt;a[^&gt;]*&gt;/&#039;, $page_content, $href_tags);
  foreach ($href_tags[0] as $href_tag) {
     @preg_match_all(&#039;/http(s)?:\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?/&#039;, $href_tag, $url);
     if (isset($url[0]) &amp;amp;amp;&amp;amp;amp; isset($url[0][0]))
        $urls[] = $url[0][0];
     unset($url);
   }
}</pre>
<p>Now that all the links are extracted from the page and stored in an array we could use those to fetch those pages, strip the links and continue. This would automatically fill the index using a simple methodology.</p>
<p>From this point on you may want to store the entire content of the page in the index together with the links on the page. So far for the basics on feeding new pages into the index.</p>
<h2>More about building a PHP search indexer</h2>
<p>For now that is enough on how to build your own search indexer. In the near future I will expand on this article with:</p>
<ul>
<li>Extracting useful information from a web page</li>
<li>Storing the indexed pages in a useful manner</li>
<li>Calculating <em>static</em> weights of web pages</li>
</ul>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2008/02/12/building-a-php-search-indexer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
