<?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>Samet Kilictas&#039;s Blog &#187; PHP</title>
	<atom:link href="http://samet.kilictas.com/category/programming/phpcoding/feed/" rel="self" type="application/rss+xml" />
	<link>http://samet.kilictas.com</link>
	<description>J2E, PHP, Linux, PL/SQL and other random rants</description>
	<lastBuildDate>Sun, 06 Nov 2011 04:36:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Cannot load mysqli extension. Please check your PHP configuration</title>
		<link>http://samet.kilictas.com/cannot-load-mysqli-extension-please-check-your-php-configuration/</link>
		<comments>http://samet.kilictas.com/cannot-load-mysqli-extension-please-check-your-php-configuration/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:01:28 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WAMP]]></category>
		<category><![CDATA[WampServer]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=364</guid>
		<description><![CDATA[Probably you are trying to access your phpmyadmin. You will get this error  if you have more then one &#8220;php.ini&#8221; file in your system. It is kinda conflicting. For instance i have wampserver2.0 and IIS7 together in my current system. I have activated IIS7 FastCgı method to use php on it. So it has one [...]]]></description>
			<content:encoded><![CDATA[<p>Probably you are trying to access your phpmyadmin. You will get this error  if you have more then one &#8220;php.ini&#8221; file in your system. It is kinda conflicting. For instance i have wampserver2.0 and IIS7 together in my current system. I have activated IIS7 FastCgı method to use php on it. So it has one php.ini file at path of  &#8220;c:\wamp\&#8230;.&#8221; and another one in &#8220;c:\Program Files\Php&#8221; . You can get a temporary solution if you rename your php.ini file which is in your &#8220;program files&#8221; path.</p>
<p>That is it.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D364&count=vertical&related=&text=Cannot%20load%20mysqli%20extension.%20Please%20check%20your%20PHP%20configuration' class='twitter-share-button' data-text='Cannot load mysqli extension. Please check your PHP configuration' data-url='http://samet.kilictas.com/?p=364' data-counturl='http://samet.kilictas.com/cannot-load-mysqli-extension-please-check-your-php-configuration/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/cannot-load-mysqli-extension-please-check-your-php-configuration/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Gedit Modifications for PHP</title>
		<link>http://samet.kilictas.com/gedit-modifications-for-php/</link>
		<comments>http://samet.kilictas.com/gedit-modifications-for-php/#comments</comments>
		<pubDate>Sun, 17 May 2009 11:37:06 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=314</guid>
		<description><![CDATA[Since i am coding with codeigniter framework on gedit, i was looking for snippets for codeigniter on gedit download gedit snippet for codeigniter By the way if you want to make your gedit more useful for programming surely you may add some third party plugins as many as you want or simply just active default [...]]]></description>
			<content:encoded><![CDATA[<p>Since i am coding with codeigniter framework on gedit, i was looking for snippets for codeigniter on gedit</p>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2009/05/php.xml">download gedit snippet for codeigniter</a></p>
<p>By the way if you want to make your gedit more useful for programming surely you may add some third party plugins as many as you want or simply just active default plugins.  Idea is that firstly download a plugin then extract its content to ‘~/.gnome2/gedit/plugins/’  directory. Once you have installed the plugin you want, you need to enable it via Edit&gt;Preferences and then the Plugins Tab. Such as;</p>
<blockquote><p>- Snippets<br />
- Class Browser<br />
- Bracket Completation<br />
- Character Map<br />
- Embedded Terminal<br />
etc..</p></blockquote>
<p>You can basicly find out third-party plugins by clicking on <a href="http://live.gnome.org/Gedit/Plugins#third_party">this link</a></p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D314&count=vertical&related=&text=Gedit%20Modifications%20for%20PHP' class='twitter-share-button' data-text='Gedit Modifications for PHP' data-url='http://samet.kilictas.com/?p=314' data-counturl='http://samet.kilictas.com/gedit-modifications-for-php/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/gedit-modifications-for-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What is PHP?</title>
		<link>http://samet.kilictas.com/what-is-php/</link>
		<comments>http://samet.kilictas.com/what-is-php/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 09:24:37 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[what is php]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=273</guid>
		<description><![CDATA[First of all i need to say that PHP is a language which you are going to in love with. (That is of course if you are a developer ) PHP stands for PHP: Hypertext Processsor. To start with it you should have knowledge about basic scripting and HTML language. PHP is totaly free to [...]]]></description>
			<content:encoded><![CDATA[<p>First of all i need to say that PHP is a language which you are going to in love with. (That is of course if you are a developer ) <strong>PHP </strong>stands for <strong>P</strong>HP: <strong>H</strong>ypertext <strong>P</strong>rocesssor.</p>
<p>To start with it you should have knowledge about basic scripting and HTML language.</p>
<p>PHP is totaly free to use and download that is because it is an open source. Well there are many scripting languages on the earth. PHP is server-side scripting language. It means codes are executing on the server-side not in the client-side.</p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2009/04/server-side-php.gif"><img class="alignnone size-medium wp-image-274" title="server-side-php" src="http://samet.kilictas.com/wp-content/uploads/2009/04/server-side-php-276x300.gif" alt="" width="276" height="300" /></a></p>
<p>Thus, clients cannot see your php script, a client can only see pure html content. Now i can say PHP is secure langauge since user cannot see your PHP code. How it works? For instance, a client (user) requests a webpage from your server. Then your server executes php code and returns pure html content to the user. And user have no chance to see what is going on at the server-side.</p>
<p><em>Extensions : .php, .php3, .phtml</em></p>
<p><span id="more-273"></span></p>
<p><strong>Why PHP?</strong></p>
<p>It works efficiently on server-side. PHP language supports many database programs such as MySQL, ISS, Informix, Oracle, Sybase, Solid,   PostgreSQL, Generic ODBC, etc. And yes it is cross-platform. It runs on many-platforms MacOS, Windows, Linux, Unix, etc. and compatible with almost all servers.</p>
<p>I will keep writing on PHP topic with more details.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D273&count=vertical&related=&text=What%20is%20PHP%3F' class='twitter-share-button' data-text='What is PHP?' data-url='http://samet.kilictas.com/?p=273' data-counturl='http://samet.kilictas.com/what-is-php/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/what-is-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s get started with jQuery</title>
		<link>http://samet.kilictas.com/lets-get-started-with-jquery/</link>
		<comments>http://samet.kilictas.com/lets-get-started-with-jquery/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 11:37:24 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=247</guid>
		<description><![CDATA[Nowadays you may see tons of Javascript frameworks coming up. The truth is that it makes your code efficient if a framework used instead of pure javascript code. Most of the javascript frameworks helps you to solve crossbrowser difficulties. Probably you heard about Prototype and MooTools. You may see some people are trying to decide [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://samet.kilictas.com/wp-content/uploads/2009/02/logo_jquery_215x53.gif"><img class="alignleft size-full wp-image-248" title="Jquery" src="http://samet.kilictas.com/wp-content/uploads/2009/02/logo_jquery_215x53.gif" alt="" width="215" height="53" /></a> Nowadays you may see tons of Javascript frameworks coming up. The truth is that it makes your code efficient if a framework used instead of pure javascript code. Most of the javascript frameworks helps you to solve crossbrowser difficulties. Probably you heard about Prototype and MooTools. You may see some people are trying to decide between these frameworks. I should say i am fan of jQuery. jQuery comes with tons of futures and flexibility and you can do a big work with less effort and it is not just a regular library however jQuery is even ajax and effect library. It does evertything i need with piece of code.</p>
<blockquote><p>jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.</p></blockquote>
<p>Let&#8217;s say you are using some other libraries as well, there it goes, jQuery is such a good friend with other libraries. API designed with conciseness and convenience as the driving factors.</p>
<p>Before start with jQuery i want you to know some basics about it. You can download the framework basically from www.jquery.com then download it on your desktop. This is how jQuery places in html code.</p>
<pre class="brush: html">&lt;html&gt;
&lt;head&gt;
&lt;strong&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt;&lt;/strong&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;strong&gt;// Your code goes here&lt;/strong&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>You can start with placing your core *.js file which is jquery.js for this example.</p>
<p><span id="more-247"></span></p>
<p><code>&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;</code></p>
<p>You may change src attribute to point your js files in your server path. Once you done with it then you can start with jquery. Now all you should do is place your code in &#8220;// Your code goes here&#8221; part.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D247&count=vertical&related=&text=Let%26%23039%3Bs%20get%20started%20with%20jQuery' class='twitter-share-button' data-text='Let&#039;s get started with jQuery' data-url='http://samet.kilictas.com/?p=247' data-counturl='http://samet.kilictas.com/lets-get-started-with-jquery/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/lets-get-started-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embed php into Javascript</title>
		<link>http://samet.kilictas.com/embed-php-into-javascript/</link>
		<comments>http://samet.kilictas.com/embed-php-into-javascript/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 23:43:49 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[$(document)]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=236</guid>
		<description><![CDATA[In javascript you cannot read variables from a server instanly however if you embed your php code you may pass variables into javascript code. So php can pass its variables when page loads. Here is an example using jquery &#60;?php $variable = &#039;Here is value&#039;; ?&#62; &#60;script type= &#34;text/javascript&#34;&#62; $(document).ready(function(){ var button = &#60;?php echo [...]]]></description>
			<content:encoded><![CDATA[<p>In javascript you cannot read variables from a server instanly however if you embed your php code you may pass variables into javascript code.</p>
<p>So php can pass its variables when page loads. Here is an example using jquery</p>
<pre class="brush: php">&lt;?php $variable = &#039;Here is value&#039;; ?&gt;
&lt;script type= &quot;text/javascript&quot;&gt;
$(document).ready(function(){
var button = &lt;?php echo $variable; ?&gt; ;
});
&lt;/script&gt;
</pre>
<p><span id="more-236"></span>Keep Coding</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D236&count=vertical&related=&text=Embed%20php%20into%20Javascript' class='twitter-share-button' data-text='Embed php into Javascript' data-url='http://samet.kilictas.com/?p=236' data-counturl='http://samet.kilictas.com/embed-php-into-javascript/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/embed-php-into-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeIgniter How to Pagination</title>
		<link>http://samet.kilictas.com/codeigniter-how-to-pagination/</link>
		<comments>http://samet.kilictas.com/codeigniter-how-to-pagination/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 08:53:02 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[CodeIgniter pagination]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[pagination class]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=101</guid>
		<description><![CDATA[CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you&#8217;re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you&#8217;re tired of ponderously large and thoroughly undocumented [...]]]></description>
			<content:encoded><![CDATA[<p>CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you&#8217;re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you&#8217;re tired of ponderously large and thoroughly undocumented frameworks.</p>
<p>CodeIgniter&#8217;s Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.</p>
<p>If you are not familiar with the term &#8220;pagination&#8221;, it refers to links that allows you to navigate from page to page, like this:</p>
<p><code><a href="http://localhost/cms/user_guide/libraries/pagination.html#">« First</a> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">&lt;</a> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">1</a> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">2</a> <strong>3</strong> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">4</a> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">5</a> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">&gt;</a> <a href="http://localhost/cms/user_guide/libraries/pagination.html#">Last »</a></code></p>
<pre class="brush: php">
function shownews()
{
if($this-&gt;userlib-&gt;logged_in())
//checking for security purposes
{
$this-&gt;load-&gt;library(&#039;pagination&#039;);
$per_page = 10;
// How many pages you want to show in each page
$total = $this-&gt;db-&gt;get(&#039;posts&#039;, $per_page, $this-&gt;uri-&gt;segment(3)); 

//Here is the most important part actually.
Basically $total variable determined which
rows you are going to show in the page

$config[&#039;base_url&#039;] = base_url().&#039;/index.php/admin/shownews&#039;;
$config[&#039;total_rows&#039;] = $this-&gt;db-&gt;count_all(&#039;posts&#039;); // Count total rows in the query
$config[&#039;per_page&#039;] = $per_page;
$config[&#039;num_links&#039;] = 6;
$this-&gt;pagination-&gt;initialize($config);
$data[&#039;posts&#039;] = $total;
$this-&gt;load-&gt;view(&#039;admin_shownews&#039;, $data);
} else {
$this-&gt;load-&gt;view(&#039;admin_logineed&#039;);
}
}
</pre>
<p>After getting done with this configuration part of pagination class all you have to do is just initialize it like you are doing it in most of programming languages.</p>
<p><span id="more-101"></span></p>
<p>Then by using $this-&gt;load-&gt;view()  parse your data array to your view which is going to be used for showing paginated items. In that view page you should use this;</p>
<pre class="brush: php">&lt;?php echo $this-&gt;pagination-&gt;create_links(); ?&gt;</pre>
<p>to auto create your pagination links. You can put this anwhere in your page you want.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D101&count=vertical&related=&text=CodeIgniter%20How%20to%20Pagination' class='twitter-share-button' data-text='CodeIgniter How to Pagination' data-url='http://samet.kilictas.com/?p=101' data-counturl='http://samet.kilictas.com/codeigniter-how-to-pagination/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/codeigniter-how-to-pagination/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A simple password generator</title>
		<link>http://samet.kilictas.com/a-simple-password-generator/</link>
		<comments>http://samet.kilictas.com/a-simple-password-generator/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 23:04:57 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[online password genetator]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=64</guid>
		<description><![CDATA[You are going to need this for sure : ) function generatePassword($length=9, $strength=0) { $vowels = &#039;aeuy&#039;; $consonants = &#039;bdghjmnpqrstvz&#039;; if ($strength &#38;amp; 1) { $consonants .= &#039;BDGHJLMNPQRSTVWXZ&#039;; } if ($strength &#38;amp; 2) { $vowels .= &#34;AEUY&#34;; } if ($strength &#38;amp; 4) { $consonants .= &#039;23456789&#039;; } if ($strength &#38;amp; 8 ) { $consonants .= [...]]]></description>
			<content:encoded><![CDATA[<p>You are going to need this for sure : )</p>
<pre class="brush: php">
function generatePassword($length=9, $strength=0) {
$vowels = &#039;aeuy&#039;;
$consonants = &#039;bdghjmnpqrstvz&#039;;
if ($strength &amp;amp; 1) {
$consonants .= &#039;BDGHJLMNPQRSTVWXZ&#039;;
}
if ($strength &amp;amp; 2) {
$vowels .= &quot;AEUY&quot;;
}
if ($strength &amp;amp; 4) {
$consonants .= &#039;23456789&#039;;
}
if ($strength &amp;amp; 8 ) {
$consonants .= &#039;@#$%&#039;;
}

$password = &#039;&#039;;
$alt = time() % 2;
for ($i = 0; $i &amp;lt; $length; $i++) {
if ($alt == 1) {
$password .= $consonants[(rand() % strlen($consonants))];
$alt = 0;
} else {
$password .= $vowels[(rand() % strlen($vowels))];
$alt = 1;
}
}
return $password;
}</pre>
<p>and..<br />
<span id="more-64"></span></p>
<p>all you have to do is change the values which are $length=9, $strength=0 then you are going to have a password which is stenght and long : )</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D64&count=vertical&related=&text=A%20simple%20password%20generator' class='twitter-share-button' data-text='A simple password generator' data-url='http://samet.kilictas.com/?p=64' data-counturl='http://samet.kilictas.com/a-simple-password-generator/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/a-simple-password-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

