Wednesday, August 7, 2013

Search Engine Optimization - SEO - Part 1 - Introduction

Hi folks! I'm Randima form geek talkz..

Now I'm going to talk something geeky. Since I started this blog I have put several post time to time, and now I thought of making this site famous. For that as you know people have to come to my site, How can I get attention of people mmm..... these are several ideas.

1. Do some stupid or funny stuff and try to make a guinness record and become famous and put my blogs name some where in the middle.
2. Suddenly talk about all the crazy things in the world and become second WikiLeaks.

wikileaks
WikiLeaks Cartoon
So on and so forth. I got lot of Ideas in to my mind. But as a geek I thought to do some useful thing. That is DO SOME SEO to my blog. As a google blog I know blogger is having a good support for search engines, buy any way my idea is to do some stuffs while blogging around them.

What is Search Engine Optimization (SEO)?
Search Engine Optimization, is process of getting traffic from "natural" listings of an Search Engine. A natural listing or in other mean a free or organic listing is a result list that a search engine prepare considering a user search query with the help of it internal algorithms, basically not paid or sponsored results are treated as natural results.

Basic facts for Search Engine Optimization (SEO)?
OK then, now we are going to talk about what are the main facts affect your page being high rank in search engine. In a nut shell if your page has genuine (not copied form else where) content chances are high you end up with a high ranking on results. Because this in continuously changing area there are no ground rule as such. Anyway there are several fact that determine the rank or the position of your site in the search resluts.

Most Important facts for Search Engine Optimization.

1. Words - Words in your articles or in your page content matters a lot.

2. Page Titles - The title of each page, and the relevancy of the content in that page to the title is also matters a lot.

3. Links - Links form other site to your site is matters a lot, but keep in mind fake links form link farms kind black hat SEO techniques will be a hinder.

4. Words in Links - Word in those links also matters a lot. As an example there is the word "search engine" in the link and support it leads to Google, then the search engines will try to build the relation between search engine and the Google site, which will be an advantage to the site, like wise.

5. Reputation - Reputation of your site as a genuine content provider will also make your site a rising star.    

Types of SEO Techniques.

black hat vs white hat SEO
Black Hat vs White Hat in SEO

Basically there are tow types of SEO techniques, some people categorize them as White Hat SEO (treated good) techniques and Black Hat SEO (treated not good, most of the time decrease the rank due to modern algorithms in search engines) and techniques. Whatever the color of the hat I found that those techniques are very interesting to learn ;). So from this point onwards we will try to find what are the white hat and black hat techniques out of there for Search Engine Optimization.

Monday, May 6, 2013

Codeignitor Session Example

Hi folks!, This simple post will explain Codeignitor session management in a vary simple coding example. In the first controller (s1.php) the sessions will be created. The send controller (s2.php) will print the session data and destroy previously added data. The third controller will again try to print the same data.

S1.php

load->library('session');
  $this->load->helper('url');
 }
 
 /*the first loading function*/
 function index(){
  echo "S1";
  $session_id = $this->session->userdata('session_id');
  echo "Session Id: ".$session_id;
  /*create session variable*/
  $this->session->set_userdata('uname','Anne');
  $data = $this->session->userdata('uname');
  echo "Newly Created Session var: ".$data;
  /*go to anotherpage link*/
  echo "<br>< a href=\"".base_url()."index.php/s2"."\">s2<a>";
 }
}

S2.php

load->library('session');
  $this->load->helper('url');
 }
 
 /*the first loading function*/
 function index(){
  echo "S2";
  $session_id = $this->session->userdata('session_id');
  /*get data from session and print*/
  $data = $this->session->userdata('uname');
  echo $data;
  /*destroy session*/
  $this->session->unset_userdata('uname');
  /*goto another page link*/
  echo "<br>< a href=\"".base_url()."index.php/s3"."\">s2<a>";
 }
}

S3.php

load->library('session');
  $this->load->helper('url');
 }
 
 /*the first loading function*/
 function index(){
  echo "S3";
  $session_id = $this->session->userdata('session_id');
  /*get data from session and print*/
  $data = $this->session->userdata('uname');
  if( isset($data) && !empty($data)){
   echo "Session Data: ".$data;
  }else{
   echo "Sesson data not found!";
  }
 }
}