<?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>TechBytes &#187; CodeIgniter</title>
	<atom:link href="http://www.asim.pk/tag/codeigniter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.asim.pk</link>
	<description>Technology Bytes</description>
	<lastBuildDate>Fri, 20 Jan 2012 12:48:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Exploring Kohana as an Alternative to CodeIgniter</title>
		<link>http://www.asim.pk/2010/01/07/exploring-kohana-as-an-alternative-to-codeigniter/</link>
		<comments>http://www.asim.pk/2010/01/07/exploring-kohana-as-an-alternative-to-codeigniter/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 19:00:54 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[KohanaPHP]]></category>
		<category><![CDATA[PHP Frameworks]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=467</guid>
		<description><![CDATA[Brett from OnWired has written a very nice blog entry on Kohana and it is exactly what I have found Kohana to be. Hence I am sharing it here for the rest of the people to read. To view the &#8230; <a href="http://www.asim.pk/2010/01/07/exploring-kohana-as-an-alternative-to-codeigniter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://onwired.com/about/brett-buddin/" target="_blank"><strong>Brett</strong></a> from <a href="http://onwired.com/about/brett-buddin/" target="_blank"><strong>OnWired</strong></a> has written a very nice blog entry on Kohana and it is exactly what I have found Kohana to be. Hence I am sharing it here for the rest of the people to read. To view the blog entry please <strong><a href="http://onwired.com/blog/exploring-kohana-as-an-alternative-to-codeigniter/" target="_blank">go here</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2010/01/07/exploring-kohana-as-an-alternative-to-codeigniter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kohana or CodeIgniter or CakePHP?</title>
		<link>http://www.asim.pk/2010/01/06/kohana-or-codeigniter-or-cakephp/</link>
		<comments>http://www.asim.pk/2010/01/06/kohana-or-codeigniter-or-cakephp/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 17:30:21 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[KohanaPHP]]></category>
		<category><![CDATA[PHP Frameworks]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=463</guid>
		<description><![CDATA[I am going to start on a small system for internal use and I wanted to re-think my choice of CodeIgniter because it does not have templates or ORM. Guess what, I landed with KohanaPHP. It sounds very tempting that &#8230; <a href="http://www.asim.pk/2010/01/06/kohana-or-codeigniter-or-cakephp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am going to start on a small system for internal use and I wanted to re-think my choice of CodeIgniter because it does not have templates or ORM. Guess what, I landed with <a href="http://kohanaphp.com" target="_blank">KohanaPHP</a>. It sounds very tempting that a new MVC Framework based on CodeIgniter with new features (especially ORM) is here but the documentation is really really poor.</p>
<p>I tried googling for a book or tutorial and I was really disappointed to have found none. I tried Amazon.com for a book but no books. Looks like I have landed in some weird space that might be good looking but I need to get my hands dirty in the code to learn it and at the end of the day, it may seem that I have lost a lot of hours on this new Framework. Lets give it a try!</p>
<p><strong>Update:</strong> As of today (28th July, 2010), I am working on YII, its good, powerful and blazing fast. It has all the feature of CakePHP too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2010/01/06/kohana-or-codeigniter-or-cakephp/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>HashPakistan needs an admin panel</title>
		<link>http://www.asim.pk/2009/07/14/hashpakistan-needs-an-admin-panel/</link>
		<comments>http://www.asim.pk/2009/07/14/hashpakistan-needs-an-admin-panel/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 05:30:49 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Pakistan]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[BUS]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[hashPakistan]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=420</guid>
		<description><![CDATA[Well, my initial estimates were wrong. I thought I could retweet the posts and Twitter would give me accurate results. The problem is with twitter results. They are giving me wrong and irrelevant results. Also, when I ask Twitter to &#8230; <a href="http://www.asim.pk/2009/07/14/hashpakistan-needs-an-admin-panel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, my initial estimates were wrong. I thought I could retweet the posts and Twitter would give me accurate results. The problem is with twitter results. They are <strong><a href="http://www.asim.pk/2009/07/13/twitter-search-gone-mad/">giving me wrong and irrelevant results</a></strong>.</p>
<p>Also, when I ask Twitter to only send me &#8220;positive&#8221; tweets, it sometimes does not mark most of the positive tweets as &#8220;positive&#8221;, in fact they are not marked at all. So there are the &#8220;positive&#8221; tweets, &#8220;negative&#8221; tweets, &#8220;questions&#8221; and &#8220;unknown&#8221; (or &#8220;unrated&#8221;) tweets. A quick look at these tweets and I can see many of them as good ones that should have been retweeted but they were not.</p>
<p>To get over this situation, I need to have an admin panel where I can see statistics and possibly &#8220;approve&#8221; the negative / unrated tweets.</p>
<p>Having previous experience working in Zend Framework, CakePHP and CodeIgniter, I would prefer to build it in<strong> <a href="http://codeigniter.com/" target="_blank">Code Igniter</a></strong>. I will keep this page updated with more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2009/07/14/hashpakistan-needs-an-admin-panel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CodeIgniter or CakePHP? can&#8217;t decide</title>
		<link>http://www.asim.pk/2009/05/26/codeigniter-or-cakephp-cant-decide/</link>
		<comments>http://www.asim.pk/2009/05/26/codeigniter-or-cakephp-cant-decide/#comments</comments>
		<pubDate>Tue, 26 May 2009 11:55:26 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP Frameworks]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=341</guid>
		<description><![CDATA[Can&#8217;t decide between CodeIgniter or CakePHP for my personal project. CodeIgniter is faster in terms of performance but development is slow, CakePHP&#8216;s cake-bake makes development faster but its performance is not good. My problem is that I need both. I &#8230; <a href="http://www.asim.pk/2009/05/26/codeigniter-or-cakephp-cant-decide/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Can&#8217;t decide between <a href="http://codeigniter.com/" target="_blank"><strong>CodeIgniter</strong></a> or <a href="http://cakephp.org/" target="_blank"><strong>CakePHP</strong></a> for my personal project. <a href="http://codeigniter.com/" target="_blank"><strong>CodeIgniter</strong></a> is faster in terms of performance but development is slow, <a href="http://cakephp.org/" target="_blank"><strong>CakePHP</strong></a>&#8216;s cake-bake makes development faster but its performance is not good. My problem is that I need both. I want it at best performance since I will be handling millions even billions of domain records AND I cannot spend more time developing my own system.</p>
<p>Any ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2009/05/26/codeigniter-or-cakephp-cant-decide/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Creating and Installing crontabs using CodeIgniter</title>
		<link>http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/</link>
		<comments>http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/#comments</comments>
		<pubDate>Thu, 14 May 2009 07:10:33 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[Crontab]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP Frameworks]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=330</guid>
		<description><![CDATA[Last night, I was trying to get a crontab working in CodeIgniter, since my current project (a personal project) is using CodeIgniter now. I didn&#8217;t wanted to use the conventional approach of running crontabs and my code seperate. Unfortunately, CodeIgniter &#8230; <a href="http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last night, I was trying to get a crontab working in CodeIgniter, since my current project (a personal project) is using CodeIgniter now. I didn&#8217;t wanted to use the conventional approach of running crontabs and my code seperate.</p>
<p>Unfortunately, CodeIgniter does not have support for Crontabs and I didn&#8217;t wanted to user wget in linux crontab to initiate unwanted requests.</p>
<p>I spent some time and came up with a solution. It uses</p>
<ol>
<li>CodeIgniter backend</li>
<li>Does not modify any core architecture of CodeIgniter</li>
<li>Keeps configuration at one place</li>
</ol>
<p>So enough of the summary and let me show you how its done.<br />
Create a file (e.g. cron.php) in the same place as your <strong>index.php</strong> and <strong>system</strong> folder. Here is its code</p>
<pre class="brush: php; title: ; notranslate">/**
* @author 	    Asim Zeeshan
* @web         http://www.asim.pk/
* @date		13th May, 2009
* @copyright 	No Copyrights, but please link back in any way
*/

/*
|---------------------------------------------------------------
| CASTING argc AND argv INTO LOCAL VARIABLES
|---------------------------------------------------------------
|
*/
$argc = $_SERVER['argc'];
$argv = $_SERVER['argv'];

// INTERPRETTING INPUT
if ($argc &gt; 1 &amp;&amp; isset($argv[1])) {
$_SERVER['PATH_INFO'] 	= $argv[1];
$_SERVER['REQUEST_URI'] = $argv[1];
} else {
$_SERVER['PATH_INFO'] 	= '/crons/index';
$_SERVER['REQUEST_URI'] = '/crons/index';
}

/*
|---------------------------------------------------------------
| PHP SCRIPT EXECUTION TIME ('0' means Unlimited)
|---------------------------------------------------------------
|
*/
set_time_limit(0);

require_once('index.php');

/* End of file test.php */
</pre>
<p>Now, we need a controller e.g. <strong>test</strong> so the controller code could be something like this. Please note that normally we do not need to output anything from these controllers since they are doing some background work or sending emails but for the sake of giving an example, I will be output-ing something to elaborate the example.</p>
<pre class="brush: php; title: ; notranslate">
/**
* @author 	    Asim Zeeshan
* @web         http://www.asim.pk/
* @date		13th May, 2009
* @copyright 	No Copyrights, but please link back in any way
*/&lt;/code&gt;

class Test extends Controller {

function __construct()
{
parent::Controller();
}

function index()
{
echo &quot;testing from index \n&quot;;
}

function test() {
echo &quot;testing from test \n&quot;;
}
}
</pre>
<p>Now execute crontab on linux command prompt</p>
<pre class="brush: plain; title: ; notranslate">php /full-path-to-cron-file/cron.php /test/index</pre>
<p>Voila! all you need now, is to setup the crontab like you normally do.<br />
This code is not shared under any license so feel free to copy/modify/use it. Please link back to this website / post in any way e.g. direct link, credits etc.</p>
<p>P.S. The examples above user PHP5 constructor, If you need to execute this code on PHP4, please modify the constructors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Template Library for CodeIgniter, Simple, Fast and Easy!</title>
		<link>http://www.asim.pk/2009/05/07/template-library-for-codeigniter-simple-fast-and-easy/</link>
		<comments>http://www.asim.pk/2009/05/07/template-library-for-codeigniter-simple-fast-and-easy/#comments</comments>
		<pubDate>Thu, 07 May 2009 07:15:59 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Template]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=324</guid>
		<description><![CDATA[If you have not noticed, I just got started on CodeIgniter. I was really disappointed today when I noticed the lack of a template system in CodeIngiter to skin my little application. They say The Template Parser Class is not &#8230; <a href="http://www.asim.pk/2009/05/07/template-library-for-codeigniter-simple-fast-and-easy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have not noticed, I just <a href="http://www.asim.pk/2009/05/06/getting-started-on-codeigniter-the-lightening-fast-php-framework/" target="_self"><strong>got started on CodeIgniter</strong></a>. I was really disappointed today when I noticed the lack of a template system in CodeIngiter to skin my little application. They <a href="http://codeigniter.com/user_guide/libraries/parser.html" target="_blank"><strong>say</strong></a></p>
<blockquote><p>The Template Parser Class is not a full-blown template parsing solution. We&#8217;ve kept it very lean on purpose in order to maintain maximum performance.</p></blockquote>
<p>Lucky for me, I got a <a href="http://maestric.com/en/doc/php/codeigniter_template" target="_blank"><strong>little help here</strong></a>, the library is great and works well for the latest version of CI too best of all its small and does not modify the CI code in anyway. It just uses the already available code to skin the application. Sleak!</p>
<p>I made a couple of modifications in the original library, here are my modifications</p>
<pre class="brush: php; title: ; notranslate">&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Template {
	var $template_data = array();

	function set($name, $value) {
		$this-&gt;template_data[$name] = $value;
	}

	function load($template = '', $view = '' , $view_data = array(), $return = FALSE) {
		$this-&gt;CI =&amp; get_instance();
		$this-&gt;set('contents', $this-&gt;CI-&gt;load-&gt;view($view, $view_data, TRUE));
		return $this-&gt;CI-&gt;load-&gt;view($template, $this-&gt;template_data, $return);
	}

	// load a default template 'template.php'
	function view($view = '' , $view_data = array(), $return = FALSE) {
		$this-&gt;CI =&amp; get_instance();
		$this-&gt;set('contents', $this-&gt;CI-&gt;load-&gt;view($view, $view_data, TRUE));
		return $this-&gt;CI-&gt;load-&gt;view('template', $this-&gt;template_data, $return);
	}
}

/* End of file Template.php */
/* Location: ./system/application/libraries/Template.php */
</pre>
<p>So now I use it like</p>
<pre class="brush: php; title: ; notranslate">$this-&gt;template-&gt;view('my_view', $view_data);</pre>
<p>instead of</p>
<pre class="brush: php; title: ; notranslate">$this-&gt;template-&gt;load('template', 'my_view', $view_data);</pre>
<p>Hope it helps somebody.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2009/05/07/template-library-for-codeigniter-simple-fast-and-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started on CodeIgniter, the lightening fast PHP Framework</title>
		<link>http://www.asim.pk/2009/05/06/getting-started-on-codeigniter-the-lightening-fast-php-framework/</link>
		<comments>http://www.asim.pk/2009/05/06/getting-started-on-codeigniter-the-lightening-fast-php-framework/#comments</comments>
		<pubDate>Wed, 06 May 2009 18:50:51 +0000</pubDate>
		<dc:creator>Asim Zeeshan</dc:creator>
				<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Fast]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Rasmus Lerdorf]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.asim.pk/?p=320</guid>
		<description><![CDATA[Today, I have started on CodeIgniter, one of the powerful PHP frameworks recommended by Rasmus Lerdorf CodeIgniter is most often noted for its speed when compared to other PHP frameworks. In a critical take on PHP frameworks in general, PHP &#8230; <a href="http://www.asim.pk/2009/05/06/getting-started-on-codeigniter-the-lightening-fast-php-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today, I have started on <a href="http://codeigniter.com" target="_blank"><strong>CodeIgniter</strong></a>, one of the powerful PHP frameworks recommended by <a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf" target="_blank"><strong>Rasmus Lerdorf</strong></a></p>
<blockquote><p>CodeIgniter is most often noted for its speed when compared to other PHP frameworks. In a critical take on PHP frameworks in general, PHP creator <a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf" target="_blank"><strong>Rasmus Lerdorf</strong></a> spoke at frOSCon in August 2008, noting that he liked CodeIgniter &#8220;because it is faster, lighter and the least like a framework&#8221;.</p></blockquote>
<p><strong><a href="http://www.sitepoint.com/blogs/2008/08/29/rasmus-lerdorf-php-frameworks-think-again/" target="_blank">Read more about it here</a></strong>.</p>
<p>So far what I can tell you is that it really is FAST. I have been coding in <strong><a href="http://cakephp.org/" target="_blank">CakePHP</a></strong> and <strong><a href="http://framework.zend.com" target="_blank">Zend Framework</a></strong>, but this framework is very fast. Truely speaking I did not felt any difference using it.</p>
<p>I will keep posting about my experience of CodeIgniter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asim.pk/2009/05/06/getting-started-on-codeigniter-the-lightening-fast-php-framework/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

