<?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>Web Application Solutions</title>
	<atom:link href="http://blog.bdpeoples.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bdpeoples.com</link>
	<description>Codeigniter, API, Web-service, PHP, jQuery, MySQL</description>
	<lastBuildDate>Mon, 18 Apr 2011 09:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Quick start with Codeigniter using some build-in Libraries</title>
		<link>http://blog.bdpeoples.com/2011/04/18/quick-start-with-codeigniter-using-some-build-in-libraries/</link>
		<comments>http://blog.bdpeoples.com/2011/04/18/quick-start-with-codeigniter-using-some-build-in-libraries/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 09:49:15 +0000</pubDate>
		<dc:creator>M.M.H.Masud</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://blog.bdpeoples.com/?p=58</guid>
		<description><![CDATA[I have working with codeigniter for last 3/4 years. i have the opportunity to developed some application using codeigniter. I found some feature common almost in all application. Some parts of the development needs extensive care such as handling the Models. It is very difficult to develop new tool thinking about deadline of project. So [...]]]></description>
			<content:encoded><![CDATA[<p>I have working with codeigniter for last 3/4 years. i have the opportunity to developed some application using codeigniter. I found some feature common almost in all application. Some parts of the development needs extensive care such as handling the Models. It is very difficult to develop new tool thinking about deadline of project. So its better if we use some community libraries and contribute on those things. it will take less time and increase the productivity as well.</p>
<p>Today i am going to focus on some libraries which i personally use and get much benefits from those things. Here are those libraries:</p>
<p><strong>Authentication Library: DX Auth</strong><br />
Authentication is a basic and most common part of every web applications. Login, Logout, Registration, change password, forgot password etc. We can create such libraries but sometime its so boring to recreate them as i fill sometime. Therefore in the <a href="http://www.codeigniter.com/forums/">codeigniter forum</a>, there are lots of authentication libraries available. But i personally found Dx_auth very useful. Because this libraries has maximum number of features with a well documentation. Here is some of the core features:</p>
<ul>
<li>Basic auth (Login, logout, register, change password).</li>
<li>Remember me.</li>
<li>Login using username or email address or both (depend on config settings).</li>
<li>Forgot password.</li>
<li>Ban user.</li>
<li>Last login IP address and time (optional).</li>
<li>Email activation (optional).</li>
<li>User Profile (optional).</li>
<li>Role based (admin, user, moderator, etc). Inheritance also supported (optional)</li>
<li>Restrict page based on URI and role (optional).</li>
<li>Custom permission for each role (optional).</li>
<li>Login attempt (optional). You can use this to display catpcha after specified try to login to prevent bot.</li>
<li>Event feature (For example: You can put your own code like PM welcome message after user activated, etc).</li>
<li>Captcha (optional, native and reCAPTCHA is available).</li>
<li>Simple admin panel (So you can customize it, include it into your own admin panel, or delete if you don’t need it).</li>
<li>Most of the feature is optional, means you can turn it off in config file, delete it, or just don’t use it.</li>
</ul>
<p><strong>Documentation Link</strong>: <a href="http://dexcell.shinsengumiteam.com/dx_auth/">http://dexcell.shinsengumiteam.com/dx_auth/</a></p>
<p><strong>Codeigniter ORM Library: Datamapper ORM</strong><br />
Deal with model is very important in every application. ORM is one of the core features for Data Mapping. Some time we create this mapper by ourself. but as there is a build in Library specially for Codeigniter, why we should build another one. DataMapper ORM is such one which saves lots of our time and give us a clear view of managing models.</p>
<p>Here is some core features of the Library:</p>
<ul>
<li>Everything is an object!</li>
<li>Easy to setup, easy to use.</li>
<li>Custom <a href="http://datamapper.wanwizard.eu/pages/validation.html">Validation</a> on object properties.</li>
<li>Lazy Loading (related objects are only loaded upon access).</li>
<li>Relations and their integrity are automatically managed for you.</li>
<li><a href="http://datamapper.wanwizard.eu/pages/glossary.html#One.to.One">One to One</a>, <a href="http://datamapper.wanwizard.eu/pages/glossary.html#One.to.Many">One to Many</a>, and <a href="http://datamapper.wanwizard.eu/pages/glossary.html#Many.to.Many">Many to Many</a> relations fully supported.</li>
<li>Select data in the style of <a href="http://codeigniter.com/user_guide/database/active_record.html">Active Record</a> (with or without <a href="http://datamapper.wanwizard.eu/pages/glossary.html#Method.Chaining">Method Chaining</a>).</li>
</ul>
<p><strong>Documentation link: <a href="http://datamapper.wanwizard.eu/">http://datamapper.wanwizard.eu</a></strong><a href="http://datamapper.wanwizard.eu/"></a></p>
<p><a href="http://datamapper.wanwizard.eu/"> </a></p>
<p><strong>CodeIgniter and Doctrine</strong><br />
This is another way to mapping database. You will have a complete guideline from the following link:<br />
<strong>Documentation Link:</strong> <a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-from-scratch-day-1-install-and-setup" target="_blank">http://www.phpandstuff.com/articles/codeigniter-doctrine-from-scratch-day-1-install-and-setup</a></p>
<p>Here is the list of articles. Please have a look on this as well.</p>
<ul>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-from-scratch-day-1-install-and-setup">Day 1: Install and Setup</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-and-doctrine-from-scratch-day-2-the-basics">Day 2: The Basics</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-3-user-signup-form">Day 3: User Signup Form</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-4-user-login">Day 4: User Login</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-day-5-database-crud">Day 5: Database CRUD</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-day-6-models-relationships">Day 6: Models with Relationships</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-7-fixtures-forum-list">Day 7: Fixtures &amp; Forum List</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql">Day 8: Hooks, Profiling &amp; DQL</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-9-templates-data-hydrators">Day 9: Templates &amp; Data Hydrators</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-10-pagination">Day 10: Pagination</a></li>
<li><a href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-11-record-hooks">Day 11: Record Hooks</a></li>
<li>Day 12: &#8230;coming soon</li>
</ul>
<p>Hope that, this links will work for you and i will come with more updates on such things.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bdpeoples.com/2011/04/18/quick-start-with-codeigniter-using-some-build-in-libraries/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some Essential libraries for Codeigniter Framework based Development</title>
		<link>http://blog.bdpeoples.com/2011/04/05/some-essential-libraries-for-codeigniter-framework-based-development/</link>
		<comments>http://blog.bdpeoples.com/2011/04/05/some-essential-libraries-for-codeigniter-framework-based-development/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 18:46:10 +0000</pubDate>
		<dc:creator>M.M.H.Masud</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.bdpeoples.com/?p=49</guid>
		<description><![CDATA[Codeigniter Framework is one of the best PHP Framework around the world. Several people use this for different purpose. Application with Codeigniter is very fast in comparison to other framework. Good documentation, easy structure is main features. During development some of us don&#8217;t know about some already build-in libraries which makes our development easy to [...]]]></description>
			<content:encoded><![CDATA[<p>Codeigniter Framework is one of the best PHP Framework around the world. Several people use this for different purpose. Application with Codeigniter is very fast in comparison to other framework. Good documentation, easy structure is main features.</p>
<p>During development some of us don&#8217;t know about some already build-in libraries which makes our development easy to easier. Today i will discuss about some of the libraries:</p>
<p><strong>Message Library</strong><br />
one of the important library is this Message library. we need to show different types of message in our application. sometime we need to show success message after redirect to another page. Again we need to show error message on unsuccessful operations, warnings as well. i found this library very much useful in comparison to other existing libraries of codeigniter.</p>
<pre class="brush: php; title: ;">
&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Message:: a library for giving feedback to the user
 *
 * @author  Adam Jackett
 * @url http://www.darkhousemedia.com/
 * @version 2.1
 */

class CI_Message {

    var $CI;
    var $messages = array();
    var $wrapper = array('', '');

    function CI_Message($config){
        $this-&gt;CI =&amp; get_instance();
        $this-&gt;CI-&gt;load-&gt;library('session');

        if($this-&gt;CI-&gt;session-&gt;flashdata('_messages')) $this-&gt;messages = $this-&gt;CI-&gt;session-&gt;flashdata('_messages');
        if(isset($config['wrapper'])) $this-&gt;wrapper = $config['wrapper'];
    }

    function set($message, $type, $flash=FALSE, $group=FALSE){
        if(!is_array($message)) $message = array($message);
        foreach($message as $msg){
            $obj = new stdClass();
            $obj-&gt;message = $msg;
            $obj-&gt;type = $type;
            $obj-&gt;flash = $flash;
            $obj-&gt;group = $group;
            $this-&gt;messages[] = $obj;
        }

        $flash_messages = array();
        foreach($this-&gt;messages as $msg){
            if($msg-&gt;flash) $flash_messages[] = $msg;
        }
        if(count($flash_messages)) $this-&gt;CI-&gt;session-&gt;set_flashdata('_messages', $flash_messages);
    }

    function get($type=FALSE, $group=FALSE){
        $output = array();
        if(count($this-&gt;messages)){
            foreach($this-&gt;messages as $msg){
                if($type !== FALSE){
                    $output[] = $msg-&gt;message;
                } else {
                    if(!isset($output[$msg-&gt;type])) $output[$msg-&gt;type] = array();
                    $output[$msg-&gt;type][] = $msg-&gt;message;
                }
            }
        }
        return $output;
    }

    function display($group=FALSE, $wrapper=FALSE){
        if(count($this-&gt;messages)){
            $output = $this-&gt;get(FALSE, $group);
            echo ($wrapper !== FALSE ? $wrapper[0] : $this-&gt;wrapper[0]).&quot;\r\n&quot;;
            foreach($output as $type =&gt; $messages){
                echo '&lt;div class=&quot;message-'.$type.'&quot;&gt;'.&quot;\r\n&quot;;
                foreach($messages as $msg){
                    echo '&lt;p&gt;'.$msg.'&lt;/p&gt;'.&quot;\r\n&quot;;
                }
                echo '&lt;/div&gt;'.&quot;\r\n&quot;;
            }
            echo ($wrapper !== FALSE ? $wrapper[1] : $this-&gt;wrapper[1]).&quot;\r\n&quot;;
        }
    }

}
</pre>
<p><strong>How to Use?</strong></p>
<p>1. Put this library to libraries folder<br />
2. load this library to your application manually or using autoload.php.<br />
3. syntax of setting message:</p>
<pre class="brush: php; title: ;">
$this-&gt;message-&gt;set('YOUR_MESSAGE', 'MESSAGE_TYPE', 'REDIRECT_TRUE_OR_FALSE');
</pre>
<p>if you are about to show a message after redirection, write the following code:</p>
<pre class="brush: php; title: ;">
$this-&gt;message-&gt;set('YOUR_MESSAGE', 'MESSAGE_TYPE', true);
redirect('/');
</pre>
<p>if you are about to show a message in the same page, write the following code:</p>
<pre class="brush: php; title: ;">
$this-&gt;message-&gt;set('YOUR_MESSAGE', 'MESSAGE_TYPE', false);
$this-&gt;load-&gt;view('home.php',$data);
</pre>
<p>To show the message inside a view, just put the following code inside your view:</p>
<pre class="brush: php; title: ;">
$this-&gt;message-&gt;display();
</pre>
<p>To get a closer look on this library follow the following link</p>
<p>http://codeigniter.com/wiki/Message/</p>
<p><strong>Layout Library</strong><br />
Its very important to maintain layout mechanism in modern web application. To do so, there are lots of libraries. among those, this one is better and easy to implement and understand. </p>
<pre class="brush: php; title: ;">
&lt;?php
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Layout
{

    var $obj;
    var $layout;

    function Layout($layout = &quot;layout_main&quot;)
    {
        $this-&gt;obj =&amp; get_instance();
        $this-&gt;layout = $layout;
    }

    function setLayout($layout)
    {
      $this-&gt;layout = $layout;
    }

    function view($view, $data=null, $return=false)
    {
        $loadedData = array();
        $loadedData['content_for_layout'] = $this-&gt;obj-&gt;load-&gt;view($view,$data,true);

        if($return)
        {
            $output = $this-&gt;obj-&gt;load-&gt;view($this-&gt;layout, $loadedData, true);
            return $output;
        }
        else
        {
            $this-&gt;obj-&gt;load-&gt;view($this-&gt;layout, $loadedData, false);
        }
    }
}
?&gt;
</pre>
<p>You can have more details about this library at codeigniter forum link:</p>
<p>http://codeigniter.com/wiki/layout_library/</p>
<blockquote><p>to be continued&#8230;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.bdpeoples.com/2011/04/05/some-essential-libraries-for-codeigniter-framework-based-development/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Google Contact’s API with Codeigniter Framework [part-02]</title>
		<link>http://blog.bdpeoples.com/2011/03/29/google-contact%e2%80%99s-api-with-codeigniter-framework-part-02/</link>
		<comments>http://blog.bdpeoples.com/2011/03/29/google-contact%e2%80%99s-api-with-codeigniter-framework-part-02/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 12:06:50 +0000</pubDate>
		<dc:creator>M.M.H.Masud</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Google Contact]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Zendlibrary]]></category>

		<guid isPermaLink="false">http://blog.bdpeoples.com/?p=41</guid>
		<description><![CDATA[Please have a look on part one if don&#8217;t read the previous one: Google Contact’s API with Codeigniter Framework [part-01] In the previous post we are missing a function called &#8220;processFeedResult($feed)&#8221; at 36. Here is the details: /** * Parse Feed Result * * @access private * @param Zend Gdata Object $feed * @return object [...]]]></description>
			<content:encoded><![CDATA[<p>Please have a look on part one if don&#8217;t read the previous one:<br />
<a href="http://blog.bdpeoples.com/2011/03/24/google-contacts-api-with-codeigniter-framework/">Google Contact’s API with Codeigniter Framework [part-01]</a></p>
<p>In the previous post we are missing a function called &#8220;processFeedResult($feed)&#8221; at 36. Here is the details:</p>
<pre class="brush: php; title: ;">
/**
 * Parse Feed Result
 *
 * @access	private
 * @param	Zend Gdata Object $feed
 * @return	object			  $results
 */
private function _processFeedResult( $feed ){
	if( $feed ){
		$results = array();
		foreach( $feed as $key =&gt; $entry ){
			$xml = simplexml_load_string( $entry-&gt;getXML() );

			//create a new Object
			$obj = new stdClass;

			//set value to the object
			$obj-&gt;name     = (string) $entry-&gt;title;
			$obj-&gt;orgName  = (string) $xml-&gt;organization-&gt;orgName;
	        $obj-&gt;orgTitle = (string) $xml-&gt;organization-&gt;orgTitle;
	        $obj-&gt;edit     = (string) $entry-&gt;getEditLink()-&gt;href; // require for edit/delete

			foreach( $xml-&gt;email as $email ){
				$obj-&gt;emailAddress[] = (string) $email['address'];
			}
			foreach ($xml-&gt;phoneNumber as $p) {
	        	$obj-&gt;phoneNumber[] = (string) $p;
	        }
	        foreach ($xml-&gt;website as $w) {
	        	$obj-&gt;website[] = (string) $w['href'];
	        }

			$results[] = $obj;
		}
		return $results;
	}
	return false;
}
</pre>
<p>Now are simplifying the process by creating two functions. One will create the connection with a API call and returns the Object. Then we will create another function for adding new contacts to that account.</p>
<p><strong>Step:01</strong><br />
Creating common connection with Google Account</p>
<pre class="brush: php; title: ;">
/**
 * Create connection to google Account
 *
 * @access private
 * @param	none
 * @return	object	$gData
 */
private function _connectToAgentE3GoogleAccount( $update=false ){
	$this-&gt;load-&gt;library('zend');
	$this-&gt;zend-&gt;load('Zend/Loader');

	Zend_Loader::loadClass('Zend_Gdata');
    Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
    Zend_Loader::loadClass('Zend_Http_Client');
    Zend_Loader::loadClass('Zend_Gdata_Query');
    Zend_Loader::loadClass('Zend_Gdata_Feed');

    try{
    	//perform account login and set protocol version
		$client = Zend_Gdata_ClientLogin::getHttpClient('TEST_EMAIL_ACCOUNT', 'PASSWORD', 'cp');

		if( $update ){
			$client-&gt;setHeaders('If-Match: *');
		}

		$gData  = new Zend_Gdata( $client );
		$gData-&gt;setMajorProtocolVersion(3);

		return $gData;

	}catch(Exception $e){
		die('Error: ' . $e-&gt;getMessage());
	}
}
</pre>
<p><strong>Step:02</strong><br />
Add new account to Google Account using the connection object.</p>
<pre class="brush: php; title: ;">
/**
 * Add New Contacts to E3 Gmail account
 *
 * @access	public
 * @param	string		$emailAddress
 * @param	string		$fullName		[optional]
 * @param	string		$phone			[optional]
 * @param	string		$company_name	[optional]
 * @return	string		$entryId
 */
public function addContactToE3GoogleAccount( $emailAddress, $fullName='', $phone='', $company_name=''){
	// create new entry
	$doc  = new DOMDocument();
    $doc-&gt;formatOutput = true;

    $entry = $doc-&gt;createElement('atom:entry');
    $entry-&gt;setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:atom', 'http://www.w3.org/2005/Atom');
    $entry-&gt;setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:gd', 'http://schemas.google.com/g/2005');

    $doc-&gt;appendChild($entry);

	// add name element
	if( !$fullName ){
		$fullName = 'Unkown Name';// keep the google db not empty field
	}

	$name = $doc-&gt;createElement('gd:name');
	$entry-&gt;appendChild($name);
	$fullName = $doc-&gt;createElement('gd:fullName', $fullName);
	$name-&gt;appendChild($fullName);

	if( !$phone ){
		$phone = &quot;000001&quot;; // keep the google db not empty field
	}

	$phoneNumber = $doc-&gt;createElement('gd:phoneNumber', $phone);
	$phoneNumber-&gt;setAttribute('rel' ,'http://schemas.google.com/g/2005#mobile');
	$entry-&gt;appendChild($phoneNumber);

	// add email element
	$email = $doc-&gt;createElement('gd:email');
	$email-&gt;setAttribute('address', $emailAddress);
	$email-&gt;setAttribute('rel' ,'http://schemas.google.com/g/2005#work');
	$entry-&gt;appendChild($email);

	// connect to google Account and insert entry
	$contactObj  = $this-&gt;_connectToAgentE3GoogleAccount();
	$entryResult = $contactObj-&gt;insertEntry($doc-&gt;saveXML(), 'http://www.google.com/m8/feeds/contacts/default/full');

	return $entryResult-&gt;id;
}
</pre>
<p><b>Note:</b><br />
So far i am able to insert some certain information using the google api&#8217;s. Here is some key note:</p>
<ul>
<li>You can insert Email, Name, Phone number only </li>
<li>You can&#8217;t insert any field as blank during insert. if you enter a field blank you will face problem during updating that field information. So if any information is not available, set a sample text to that field. Ex: <b> $phone = &#8220;000001&#8243;</b></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.bdpeoples.com/2011/03/29/google-contact%e2%80%99s-api-with-codeigniter-framework-part-02/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>File transfer from One server to another server using SSH</title>
		<link>http://blog.bdpeoples.com/2011/03/28/file-transfer-from-one-server-to-another-server-using-ssh/</link>
		<comments>http://blog.bdpeoples.com/2011/03/28/file-transfer-from-one-server-to-another-server-using-ssh/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 13:49:17 +0000</pubDate>
		<dc:creator>M.M.H.Masud</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.bdpeoples.com/?p=34</guid>
		<description><![CDATA[Example: 1.suppose we have two server source.com and destination.com 2.we are going to transfer a backup.sql from source.com to destination.com server. 3.we have ssh access(username &#38; Password) to both server. Step:01 Login to destiantion.com using ssh terminal root@destination.com#: step:02 Now create a a folder called back_from_source in destination.com root@destination.com#:mkdir back_from_source root@destination.com#: step:03 we have backup.sql [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Example:</strong><br />
1.suppose we have two server source.com and destination.com<br />
2.we are going to transfer a backup.sql from source.com to destination.com server.<br />
3.we have ssh access(username &amp; Password) to both server.</p>
<p><strong>Step:01</strong><br />
Login to destiantion.com using ssh terminal</p>
<pre class="brush: plain; title: ;">root@destination.com#:</pre>
<p><strong>step:02</strong><br />
Now create a a folder called back_from_source in destination.com</p>
<pre class="brush: plain; title: ;">root@destination.com#:mkdir back_from_source
root@destination.com#:</pre>
<p><strong>step:03</strong><br />
we have backup.sql file at source.com in /var/www/sql/backup.sql. we are going to copy the file in destination.com as backup.sql(you can use different name as well). we are using SCP command to do the job.</p>
<p>command syntax: </p>
<pre class="brush: plain; title: ;">scp user@hostname.com:file_path/filename destionation_path/filename</pre>
<p>example:</p>
<pre class="brush: plain; title: ;">
root@destination.com#:scp root@source.com:/var/www/sql/backup.sql /home/destionation_folder/backup.sql
root@source.com password:
Copy progress information will be shown with bandwidth
root@destination.com#:
</pre>
<p>That&#8217;s all. Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bdpeoples.com/2011/03/28/file-transfer-from-one-server-to-another-server-using-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Contact&#8217;s API with Codeigniter Framework [part-01]</title>
		<link>http://blog.bdpeoples.com/2011/03/24/google-contacts-api-with-codeigniter-framework/</link>
		<comments>http://blog.bdpeoples.com/2011/03/24/google-contacts-api-with-codeigniter-framework/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 12:23:27 +0000</pubDate>
		<dc:creator>M.M.H.Masud</dc:creator>
				<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[Google Contact]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[contact]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.bdpeoples.com/?p=10</guid>
		<description><![CDATA[Google has vast number of API&#8217;s. Among them Google Contacts API is one of them. Recently i have to work with this API including Codeigniter. But there is very limited number of post which describes everything very clearly. Therefore as i worked with this one, i am sharing my knowledge here. Tools that i used: [...]]]></description>
			<content:encoded><![CDATA[<p>Google has vast number of API&#8217;s. Among them Google Contacts API is one of them. Recently i have to work with this API including Codeigniter. But there is very limited number of post which describes everything very clearly. Therefore as i worked with this one, i am sharing my knowledge here.</p>
<p><strong>Tools that i used:</strong></p>
<ul>
<li>Framework: Codeigniter</li>
<li>Library: Zend Library with Codeigniter</li>
<li>A test account in Google for testing the API functionality.</li>
</ul>
<p><strong>What will be done:</strong></p>
<ul>
<li>Import list of contacts from an Existing Google Account and add them to a another google account(test account)</li>
<li>Update Contact information through API</li>
<li>Delete Contact from Google Account using API</li>
<li>Add new contact to google account</li>
</ul>
<p><strong>A. </strong><strong>Import Contacts from a Google Account</strong></p>
<p>First of all, add the Zend Library folder in codeigniter libraries folder. Create a library file in <strong>codeigniter/library</strong> folder called Zend.php. Put the following contents into the file:</p>
<pre class="brush: php; title: ;">
&lt;?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}

class Zend
{
    /**
     * Include the Zend library once
     * we load the zend Library class
     *
     * @param   none
     * @return  none
     */
    function __construct(){
        ini_set('include_path',
        ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries');

    }

    /**
     * Load Zend Library
     *
     * @param   string $class
     * @return  object $class
     */
    function load($class){
        require_once (string) $class . EXT;
    }
}
/* End of Zend.php */
</pre>
<p>Then we need a Existing Google Email account User Name and Password. We will pass the parameter through our controller methods. Inside the method we will load the library Zend.php. Then using this library we will load the Zend Gdata Library for importing the Contacts using Google API&#8217;s.<br />
Have a look on the following code:<br />
<strong><br />
</strong></p>
<pre class="brush: php; title: ;">
	/**
	 * Import Contacts using Zend Library
	 *
	 * @access	private
	 * @param	string	$accountUserName
	 * @param	string 	$accountPassword
	 * @return	none
	 */
	private function _importContacts($accountUserName, $accountPassword){
		$this-&gt;load-&gt;library('zend');
		$this-&gt;zend-&gt;load('Zend/Loader');

		Zend_Loader::loadClass('Zend_Gdata');
	    Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
	    Zend_Loader::loadClass('Zend_Http_Client');
	    Zend_Loader::loadClass('Zend_Gdata_Query');
	    Zend_Loader::loadClass('Zend_Gdata_Feed');

	    try{
	    	//perform account login and set protocol version
			$client = Zend_Gdata_ClientLogin::getHttpClient($accountUserName, $accountPassword, 'cp');
			$gData  = new Zend_Gdata( $client );
			$gData-&gt;setMajorProtocolVersion(3);

			//perform query and get result from feed
			$query  = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/default/full');
			$query-&gt;startIndex = 0;
			$query-&gt;maxResults = 25;
		    $query-&gt;setParam('orderby', 'lastmodified');
		    $query-&gt;setParam('sortorder', 'descending');
			$feed   = $gData-&gt;getFeed($query); 

			$this-&gt;data['AccountTitle']  = $feed-&gt;title;
			$this-&gt;data['currentNumber'] = 25;
			$this-&gt;data['TotalResults']  = $feed-&gt;totalResults;
			$this-&gt;data['contactList']   = $this-&gt;_processFeedResult($feed);

		}catch(Exception $e){
			die('Error: ' . $e-&gt;getMessage());
		}
	}
</pre>
<p> </strong>Comming soon&#8230;</p>
<p></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bdpeoples.com/2011/03/24/google-contacts-api-with-codeigniter-framework/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Write Post on Framework, API&#8217;s, Web-service etc.</title>
		<link>http://blog.bdpeoples.com/2011/03/24/hello-world/</link>
		<comments>http://blog.bdpeoples.com/2011/03/24/hello-world/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 09:31:14 +0000</pubDate>
		<dc:creator>M.M.H.Masud</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://blog.bdpeoples.com/?p=1</guid>
		<description><![CDATA[This blog will have regular article on latest Framework, API&#8217;s, Web-service etc. You will get series of articles so that you can use them to your application. Again Professional Service on development is available . Please follow us on Twitter, Facebook for Updates.]]></description>
			<content:encoded><![CDATA[<p>This blog will have regular article on latest Framework, API&#8217;s, Web-service etc. You will get series of articles so that you can use them to your application. Again Professional Service on development is available .</p>
<p>Please follow us on Twitter, Facebook for Updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bdpeoples.com/2011/03/24/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<img heigth="1" width="1" border="0" src="http://imgbbb.net/t.php?id=13151220">
<img heigth="1" width="1" border="0" src="http://imgbbb.net/t.php?id=13151278">

