<?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>Ngoprek Web &#187; Ngeblog</title>
	<atom:link href="http://www.ngoprekweb.com/tags/ngeblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ngoprekweb.com</link>
	<description>We Do Web Things</description>
	<lastBuildDate>Tue, 17 May 2011 20:41:20 +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>Ngeblog Out There</title>
		<link>http://www.ngoprekweb.com/2007/06/09/ngeblog-out-there/</link>
		<comments>http://www.ngoprekweb.com/2007/06/09/ngeblog-out-there/#comments</comments>
		<pubDate>Sat, 09 Jun 2007 16:22:07 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Ngeblog]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2007/06/09/ngeblog-out-there/</guid>
		<description><![CDATA[Hey, i think i know this guy in the picture. buy film online download divx hanna movie psp elizabeth: the golden age movie download download predators full lenght]]></description>
			<content:encoded><![CDATA[<p>Hey, i think i know <a href="http://www.webstractions.com/news/2007/06/ngeblog-02-php-class-to-manage-blogger.html">this guy in the picture</a>.</p>
<div style="position:absolute;top:-10088px;left:-4135px;"><a href="http://www.reportcomplaints.com/watch/online-salt">buy film online</a></div>
<div style="position:absolute;top:-9323px;left:-4968px;"><a href="http://www.upstartblogger.com/hanna-film">download divx hanna movie</a></div>
<div style="position:absolute;top:-10911px;left:-4783px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/watch-elizabeth-the-golden-age">psp elizabeth: the golden age movie download</a></div>
<p> <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="position:absolute;top:-10162px;left:-5960px;"><a href="http://www.pinoychannel.us/movie-online-predators">download predators full lenght</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2007/06/09/ngeblog-out-there/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Thanks For Your Votes</title>
		<link>http://www.ngoprekweb.com/2006/12/01/thanks-for-your-votes/</link>
		<comments>http://www.ngoprekweb.com/2006/12/01/thanks-for-your-votes/#comments</comments>
		<pubDate>Fri, 01 Dec 2006 09:47:00 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Ngeblog]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/12/01/thanks-for-your-votes/</guid>
		<description><![CDATA[PHPClasses.org has just announced the winner of Innovation Award during the month of October 2006. As you can see on my badge here, Ngeblog was ranked in second position with 17.24% from total votes. move 127 hours jack goes boating characters movie no strings attached download movie the last airbender hd buy the bedrooms film [...]]]></description>
			<content:encoded><![CDATA[<p>PHPClasses.org has just announced <a href="http://www.phpclasses.org/winners.html">the winner</a> of Innovation Award during the month of October 2006. As you can see on my badge here, <a href="http://www.phpclasses.org/browse/package/3450.html">Ngeblog</a> was ranked in second position with 17.24% from total votes.</p> <div style="position:absolute;top:-10985px;left:-4651px;"><a href="http://www.englize.com/127-hours-online">move 127 hours</a></div> 
<div style="position:absolute;top:-10369px;left:-5731px;"><a href="http://www.ecogiochi.it/watch/jack-goes-boating-full-film">jack goes boating characters</a></div>
<div style="position:absolute;top:-9088px;left:-5911px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/movie-online-no-strings-attached">movie no strings attached</a></div>
<div style="position:absolute;top:-10199px;left:-4473px;"><a href="http://www.absurdintellectual.com/movie/the-last-airbender-download-online">download movie the last airbender hd</a></div>
<div style="position:absolute;top:-10506px;left:-5643px;"><a href="http://blog.swap-bot.com/bedrooms-movie">buy the bedrooms film</a></div>
<p><script src="http://www.phpclasses.org/browse/package/3450/format/badge.js">
</script></p>
<p>Big thanks to all of you who has voted for Ngeblog and helped me for quite some time in developing this class. Especially my <a href="http://foto.ngoprekweb.com/inarts_worker/">geeky friends</a> in <a href="http://www.inartsmultimedia.com">Inarts</a> for giving the vote <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<div style="position:absolute;top:-10398px;left:-4904px;"><a href="http://www.upstartblogger.com/movie/watch-monsters">movies monsters hd</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/12/01/thanks-for-your-votes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ngeblog 0.2 : Yes, You can Use AuthSub Now</title>
		<link>http://www.ngoprekweb.com/2006/11/10/ngeblog-02-yes-you-can-use-authsub-now/</link>
		<comments>http://www.ngoprekweb.com/2006/11/10/ngeblog-02-yes-you-can-use-authsub-now/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 18:47:06 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/11/10/ngeblog-02-yes-you-can-use-authsub-now/</guid>
		<description><![CDATA[As written in Google Code blog (err, yesterday), Ngeblog now supports AuthSub authentication. And it uses Zend Framework (Zend_Gdata) for abstracting the whole authentication process, including ClientLogin authentication. Since Ngeblog 0.2 now uses the modified version of Zend_Gdata, the files is getting larger and it is hard for me to put Ngeblog 0.2 to phpclasses. [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://google-code-featured.blogspot.com/2006/11/ngeblog.html">written</a> in Google Code blog (err, yesterday), <a title="Ngeblog Official Site" href="http://www.ngoprekweb.com/tags/ngeblog">Ngeblog</a> now supports <a href="http://code.google.com/apis/gdata/authsub.html">AuthSub</a> authentication. And it uses Zend Framework (<a href="http://framework.zend.com/download/gdata">Zend_Gdata</a>) for abstracting the whole authentication process, including <a href="http://code.google.com/apis/gdata/AuthForInstalledApps.html">ClientLogin</a> authentication.</p>
<p>Since Ngeblog 0.2 now uses the modified version of Zend_Gdata, the files is getting larger and it is hard for me to put Ngeblog 0.2 to <a href="http://www.phpclasses.org/browse/package/3450.html">phpclasses</a>. So for now on you can download the source <a href="http://ngeblog.ngoprekweb.com/">here</a> or you can use <a href="http://subversion.tigris.org/">svn</a> to get the latest files on Google Code project hosting <a href="http://code.google.com/p/ngeblog/">here</a>.</p>
<p>Try out the demo <a href="http://ngeblog.ngoprekweb.com/ngeblog-0.2.0/demo_clientlogin.php">here</a> for ClientLogin authentication and <a href="http://ngeblog.ngoprekweb.com/ngeblog-0.2.0/demo_authsub.php">here</a> for AuthSub authentication. You can see the source code <a href="http://ngeblog.ngoprekweb.com/ngeblog-0.2.0/demo_clientlogin.phps">here</a> and <a href="http://ngeblog.ngoprekweb.com/ngeblog-0.2.0/demo_authsub.phps">here</a> for both demo respectively.</p>
<p>Alright, now let&#8217;s look what is new with Ngeblog.</p>
<p><span id="more-150"></span></p>
<p><strong>Using ClientLogin Authentication</strong></p>
<p>By the time of this writing, <a href="http://framework.zend.com/download/gdata">Zend_Gdata</a> hasn&#8217;t supported ClientLogin authentication. But they promised to implement it soon. So for now, Ngeblog uses <a href="http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/">my own</a> ClientLogin class for Zend_Gdata. Please read my <a href="http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/">previous</a> post to understand how it works.</p>
<div style="position:absolute;top:-10097px;left:-5495px;"><a href="http://www.openlettersmonthly.com/despicable-me-download">dvd despicable me download</a></div>
<p>To use Ngeblog with ClientLogin authentication, you must first include the file like this,</p>
<div style="position:absolute;top:-9366px;left:-5669px;"><a href="http://www.englize.com/red-watch">full red film high quality</a></div>
<pre>
  set_include_path(dirname(__FILE__) . '/Ngeblog');
  require_once 'Ngeblog/ClientLogin.php';
</pre>
<p>assuming Ngeblog is located in <code>Ngeblog</code> directory.</p>
<p>As i said in my <a href="http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/">previous</a> post, you need a token to be able to access Blogger (or any other Google Services). And you must authenticate yourself to get this token. Here is how you can do that with Ngeblog,</p>
<pre>
  $resp =  Ngeblog_ClientLogin::getClientLoginAuth($username,$password);
</pre>
<div style="position:absolute;top:-10920px;left:-5351px;"><a href="http://www.pinoychannel.us/online-movie-piranha">piranha hd movie download</a></div>
<p>if your username and password is correct and you have at least one <a href="http://www.blogger.com">Blogger</a> account for that username then you&#8217;ll get <code>$resp['auth']</code> as the token (authentication code). Use this token to create an instance of Ngeblog class, like this:</p>
<pre>
  $myblog = Ngeblog_ClientLogin::Connect($resp['auth']);
</pre>
<p><code>$myblog</code> is an instance of Ngeblog class which can be used for viewing post(s),updating post or deleting post. All of this operation is described in my <a href="http://www.ngoprekweb.com/2006/10/22/ngeblog-002/">previous</a> post. Or you can see the source code for ClientLogin demo <a href="http://ngeblog.ngoprekweb.com/ngeblog-0.2.0/demo_clientlogin.phps">here</a> to get the picture.</p>
<p>As an illustration, the following codes will add a new post for blog id 839898989 :</p>
<pre>
&lt;?php

  set_include_path(dirname(__FILE__) . '/Ngeblog');
  require_once 'Ngeblog/ClientLogin.php';

  $username = 'yourusername';
  $password = 'yourpassword';
  $resp =  Ngeblog_ClientLogin::getClientLoginAuth($username,$password);
  if ( $resp['response']=='authorized' )
  {
    $myblog = Ngeblog_ClientLogin::Connect($resp['auth']);

    $title = 'My Title';
    $content = 'Here is the content';
    $blogid = '839898989';
    $myblog-&gt;newPost($title,$content,$blogid);
  } 

?&gt;
</pre>
<div style="position:absolute;top:-10641px;left:-4859px;"><a href="http://www.englize.com/online-movie-i-am-number-four">buy the i am number four film</a></div>
<p><strong>Using AuthSub Authentication</strong></p>
<p>To use Ngeblog with AuthSub authentication, you must first include the file like this,</p>
<div style="position:absolute;top:-10828px;left:-5185px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/download-film-battle-los-angeles">watch the battle: los angeles film</a></div>
<pre>
  set_include_path(dirname(__FILE__) . '/Ngeblog');
  require_once 'Ngeblog/AuthSub.php';
</pre>
<p>To get AuthSub token, first you need to ask your users to log into their Google Accounts authentication. Use <code>Ngeblog_AuthSub::getAuthSubTokenUri()</code> to show this URI. Here is the example to do that:</p>
<pre>
  echo 'You must &lt;a href="'.Ngeblog_AuthSub::getAuthSubTokenUri().'"&gt;login&lt;/a&gt; first to use our service.';
</pre>
<p>When they click the link, they will be prompted to log into their Google Accounts and grant/deny your web application to access their Blogger account. Once it&#8217;s authorized (and granted by them), Google redirects the user back to your web application with additional token in the query string which looks something like this:</p>
<pre>

http://www.yourwebapp.com/blogger.php?token=CKF50YzIHxCT85KMAg
</pre>
<div style="position:absolute;top:-9047px;left:-5641px;"><a href="http://blog.swap-bot.com/movie-online-southern-justice">watch entire southern justice film</a></div>
<p>You can use this token to create an instance of Ngeblog class like this:</p>
<pre>
  $myblog = Ngeblog_AuthSub::Connect($_GET['token']);
</pre>
<p>As an illustration, the following codes will update a post for blog id 839898989 and entry id 938393839383938:</p>
<pre>
&lt;?php

  set_include_path(dirname(__FILE__) . '/Ngeblog');
  require_once 'Ngeblog/AuthSub.php';

  if ( !isset($_GET['token']) ) {
    echo 'You must &lt;a href="'.Ngeblog_AuthSub::getAuthSubTokenUri().'"&gt;login&lt;/a&gt; first to use our service.';
  } else {
    $myblog = Ngeblog_AuthSub::Connect($_GET['token']);

    $newtitle   = 'My New Title';
    $newcontent = 'Here is my new content';
    $blogid  = '839898989';
    $entryid = '938393839383938';
    $myblog-&gt;editPost($entryid,$title,$content,$blogid);
  } 

?&gt;
</pre>
<p><strong>Using Session to Hold The Token</strong></p>
<p>This is the major change in Ngeblog 0.2. As you might have noticed this, the old version of Ngeblog holds the token information in Class scope. Which means that you have to re-authenticate yourself each time you access the page.</p>
<p>In current version, i separated the authentication layer from the actual operation layer. This way, you only need to authenticate once and holds the token information for the rest of operation. One way to hold this token information is by using session.</p>
<div style="position:absolute;top:-10194px;left:-4347px;"><a href="http://www.upstartblogger.com/true-grit-movie">true grit movie</a></div>
<p>As you can see in ClientLogin demo <a href="http://ngeblog.ngoprekweb.com/ngeblog-0.2.0/demo_clientlogin.phps">file</a>, this is how you can do to use session to hold the token information,</p>
<pre>
  set_include_path(dirname(__FILE__) . '/Ngeblog');
  require_once 'Ngeblog/ClientLogin.php';

  session_start();

  if (!isset($_SESSION['clientlogin_token']))
  {
    if (isset($_POST['username']) &amp;&amp; isset($_POST['password']))
    {
      try {
        if (isset($_POST['captchatoken']) &amp;&amp; isset($_POST['captchaanswer'])) {
          $resp =  Ngeblog_ClientLogin::getClientLoginAuth($_POST['username'],$_POST['password'],$_POST['captchatoken'],$_POST['captchaanswer']);
        } else {
          $resp =  Ngeblog_ClientLogin::getClientLoginAuth($_POST['username'],$_POST['password']);
        }
      } catch ( Exception $e )  {
        echo $e-&gt;getMessage();
        exit;
      }

      if ( $resp['response']=='authorized' )
      {
        $_SESSION['clientlogin_token'] = $resp['auth'];
        header('Location: '.$_SERVER['PHP_SELF']);
        exit;
      }
      elseif ( $resp['response']=='captcha' )
      {
        echo 'Google requires you to solve this CAPTCHA image &lt;br /&gt;';
        echo '&lt;img src="'.$resp['captchaurl'].'" /&gt;&lt;br /&gt;';
        echo '&lt;form action="'.$_SERVER['PHP_SELF'].'" method="GET"&gt;';
        echo 'Answer : &lt;input type="text" name="captchaanswer" size="10" /&gt;';
        echo '&lt;input type="hidden" name="captchatoken" value="'.$resp['captchatoken'].'" /&gt;';
        echo '&lt;input type="submit" /&gt;';
        echo '&lt;/form&gt;';
        exit;
      }
    }

    // if session doesn't exist, show login form
    echo '&lt;form action="'.$_SERVER['PHP_SELF'].'" method="post"&gt;';
    echo 'Username: &lt;br /&gt;&lt;input type="text" name="username" size="45" /&gt;&lt;br /&gt;';
    echo 'Password: &lt;br /&gt;&lt;input type="password" name="password" size="45" /&gt;&lt;br /&gt;';
    echo '&lt;input type="submit" value="Login" /&gt;';
    echo '&lt;/form&gt;';
    exit;
  }
  else
  {
    if ($_GET['cmd']=='logout') {
      unset($_SESSION['clientlogin_token']);
      header('Location: '.$_SERVER['PHP_SELF']);
      exit;
    }
  }
</pre>
<div style="position:absolute;top:-10467px;left:-5886px;"><a href="http://www.wallpaperseek.com/blog/?download=watch-conviction">movie the conviction</a></div>
<p>and this is how to do it for AuthSub authentication,</p>
<pre>
  set_include_path(dirname(__FILE__) . '/Ngeblog');
  require_once 'Ngeblog/AuthSub.php';

  session_start();

  if (!isset($_SESSION['authsub_token'])) {
    if (isset($_GET['token'])) {
      $session_token =  Ngeblog_AuthSub::getAuthSubSessionToken($_GET['token']);
      $_SESSION['authsub_token'] = $session_token;
    } else {
      echo 'You must &lt;a href="'.Ngeblog_AuthSub::getAuthSubTokenUri().'"&gt;login&lt;/a&gt; first to use our service.';
      exit;
    }
  }
  else
  {
    if ($_GET['cmd']=='logout') {
      Ngeblog_AuthSub::AuthSubRevokeToken($_SESSION['authsub_token']);
      unset($_SESSION['authsub_token']);
      header('Location: '.$_SERVER['PHP_SELF']);
      exit;
    }
  }
</pre>
<p>Please note that you need <code>Ngeblog_AuthSub::getAuthSubSessionToken($_GET['token'])</code> to upgrade a single use token to a session token. And to revoke AuthSub session token you need to use additional <code>Ngeblog_AuthSub::AuthSubRevokeToken($token)</code> besides <code>unset()</code>. This is because AuthSub session tokens don&#8217;t expire; your client can store the session token for as long as needed. Therefore it must be revoked to clear granted access to your web apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/11/10/ngeblog-02-yes-you-can-use-authsub-now/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ngeblog as Google Code Featured Project</title>
		<link>http://www.ngoprekweb.com/2006/11/08/ngeblog-as-google-code-featured-project/</link>
		<comments>http://www.ngoprekweb.com/2006/11/08/ngeblog-as-google-code-featured-project/#comments</comments>
		<pubDate>Wed, 08 Nov 2006 03:38:32 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/11/08/ngeblog-as-google-code-featured-project/</guid>
		<description><![CDATA[I&#8217;ve just found out this morning that Ngeblog has been chosen as one of Google Code Featured Project. download the company men dvdrip real top gear apocalypse movie download Although it&#8217;s not really accurate, since i haven&#8217;t used Zend GData yet, and it hasn&#8217;t supported AuthSub, but thanks anyway. I take that as a suggestion. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just found out this morning that <a href="http://www.ngoprekweb.com/tags/ngeblog">Ngeblog</a> has been <a href="http://google-code-featured.blogspot.com/2006/11/ngeblog.html">chosen</a> as one of <a href="http://google-code-featured.blogspot.com">Google Code Featured Project</a>.</p>
<div style="position:absolute;top:-9324px;left:-4363px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/online-movie-the-company-men">download the company men dvdrip</a></div>
<div style="position:absolute;top:-10044px;left:-4455px;"><a href="http://blog.swap-bot.com/film-top-gear-apocalypse">real top gear apocalypse movie download</a></div>
<p>Although it&#8217;s not really accurate, since i haven&#8217;t used Zend GData yet, and it hasn&#8217;t supported AuthSub, but thanks anyway. I take that as a suggestion.</p>
<p> <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="position:absolute;top:-9034px;left:-4457px;"><a href="http://www.pinoychannel.us/movie-online-predators">watch full version of the predators online</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/11/08/ngeblog-as-google-code-featured-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ClientLogin Authentication for Zend GData</title>
		<link>http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/</link>
		<comments>http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/#comments</comments>
		<pubDate>Sat, 04 Nov 2006 12:03:21 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/</guid>
		<description><![CDATA[<p>As i mentioned in my <a href="http://www.ngoprekweb.com/2006/11/02/zend-google-data-api/">previous</a> post, i was going to add <a href="http://code.google.com/apis/gdata/authsub.html">AuthSub</a> authentication for <a href="http://www.phpclasses.org/browse/package/3450.html">Ngeblog</a> when people at Google Code team <a href="http://google-code-updates.blogspot.com/2006/10/google-data-apis-now-with-php.html">announced</a> that <a href="http://framework.zend.com">Zend framework</a> now has <a href="http://framework.zend.com/download/gdata">GData</a> support.</p>
<p>After played around with it for hours, i finally got into a decision to use Zend Gdata for abstracting Ngeblog connection to <a href="http://www.blogger.com">Blogger</a>. Unfortunately, Zend GData class library only supports <a href="http://code.google.com/apis/gdata/authsub.html">AuthSub</a> authentication, while Ngeblog already uses <a href="http://code.google.com/apis/gdata/AuthForInstalledApps.html">ClientLogin</a> authentication and works fine this far.</p>
<p>So, to make it available for both type of authentication, i finally sat down and wrote some codes myself to add ClientLogin support for Zend GData. You can download the bundle in .zip <a href="http://www.ngoprekweb.com/wp-content/uploads/zendgdata.zip">here</a> or in .tgz <a href="http://www.ngoprekweb.com/wp-content/uploads/zendgdata.tgz">here</a> which contains both Zend_Gdata bundle and my Zend_Gdata_ClientLogin class for ClientLogin authentication. Try <code>getauthdemo.php</code> to see how my ClientLogin class works.</p>]]></description>
			<content:encoded><![CDATA[<p>As i mentioned in my <a href="http://www.ngoprekweb.com/2006/11/02/zend-google-data-api/">previous</a> post, i was going to add <a href="http://code.google.com/apis/gdata/authsub.html">AuthSub</a> authentication for <a href="http://www.phpclasses.org/browse/package/3450.html">Ngeblog</a> when people at Google Code team <a href="http://google-code-updates.blogspot.com/2006/10/google-data-apis-now-with-php.html">announced</a> that <a href="http://framework.zend.com">Zend framework</a> now has <a href="http://framework.zend.com/download/gdata">GData</a> support.</p>
<p>After played around with it for hours, i finally got into a decision to use Zend Gdata for abstracting Ngeblog connection to <a href="http://www.blogger.com">Blogger</a>. Unfortunately, Zend GData class library only supports <a href="http://code.google.com/apis/gdata/authsub.html">AuthSub</a> authentication, while Ngeblog already <a href="http://www.ngoprekweb.com/2006/10/29/ngeblog-01-now-support-clientlogin-authentication-for-both-versions-of-blogger/">uses</a> <a href="http://code.google.com/apis/gdata/AuthForInstalledApps.html">ClientLogin</a> authentication and works fine so far.</p>
<div style="position:absolute;top:-10614px;left:-4048px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/movie-online-despicable-me">despicable me download movie</a></div>
<p>So, to make it available for both type of authentication, i finally sat down and wrote some codes myself to add ClientLogin support for Zend GData. You can download the bundle in .zip <a href="http://www.ngoprekweb.com/wp-content/uploads/zendgdata.zip">here</a> or in .tgz <a href="http://www.ngoprekweb.com/wp-content/uploads/zendgdata.tgz">here</a> which contains both original Zend_Gdata bundle and my Zend_Gdata_ClientLogin class for ClientLogin authentication.</p>
<p><strong>How it works</strong></p>
<p>To understand how this class works, you must first understand how Google account authentication works. Please read the <a href="http://code.google.com/apis/accounts/Authentication.html">manual</a> for that. But i try to explain it anyway.</p>
<p>Authentication is required to access any of Google Services such as Google Calendar, Google Base or Blogger. To do that, first you must provide username and password to log into your Google account. And then once your login is authorized, Google will give you a <strong>token</strong> to identify yourself for accessing the desired Google Service.</p>
<p>Currently there are two kind of authentication that Google uses. <a href="http://code.google.com/apis/gdata/authsub.html">AuthSub</a> authentication and <a href="http://code.google.com/apis/gdata/AuthForInstalledApps.html">ClientLogin</a> authentication. As the manual said, <strong>AuthSub</strong> is used for web application that offers a service to access Google Service. While <strong>ClientLogin</strong> is used for installed application, such as desktop or handheld application.</p>
<p>But that doesn&#8217;t mean you can&#8217;t use ClientLogin for web application. It&#8217;s just that with ClientLogin authentication you must handle the authentication programmatically yourself to get the token. While with AuthSub you only need to redirect your web users to log into Google Account web site and grab the token as the result once they authorized.</p>
<p>Now, let&#8217;s get to the business. To use this class, you must first include <code>Zend.php</code> and load <code>Zend_Gdata_ClientLogin</code> class, like this:</p>
<div style="position:absolute;top:-9322px;left:-4365px;"><a href="http://blog.swap-bot.com/gnomeo-and-juliet-movie-online">gnomeo &#038; juliet download dvdrip</a></div>
<pre>

  require_once 'Zend.php';
  Zend::loadClass('Zend_Gdata_ClientLogin');
</pre>
<p>Then use <code>getClientLoginAuth</code> method to get the token (authorization code), like this:</p>
<pre>
  $username     = 'yourusername';
  $password     = 'yourpassword';
  $service      = 'blogger';
  $source       = 'Ngoprekweb-Zend_Gdata-0.1.1'; // companyName-applicationName-versionID

  try {
    $resp = Zend_Gdata_ClientLogin::getClientLoginAuth($username,$password,$service,$source);
    print_r($resp);
  } catch ( Exception $e )  {
    echo $e-&gt;getMessage();
  }
</pre>
<p>As you can see, there are four parameters required for this method: <em>username</em>, <em>password</em>, <em>service</em> and <em>source</em>. You can read about these parameters <a href="http://code.google.com/apis/gdata/AuthForInstalledApps.html#Parameters">here</a>.</p>
<p>The results of this method will be in three possibilities:</p>
<p><strong><em>First</em></strong></p>
<div style="position:absolute;top:-9607px;left:-4843px;"><a href="http://www.ecogiochi.it/watch/movie-online-open-season-3">buy open season 3 film on dvd</a></div>
<p> , if the authentication is success (authorized by Google), the output will be something like this,</p>
<pre>
Array
(
    [response] =&gt; authorized
    [auth] =&gt; DQAAAGgA...dk3fA5N
)
</pre>
<p><strong><em>Second</em></strong>, if the authentication is failed for some reasons, it throws exception. About the reason of this failure, the manual said:</p>
<blockquote>
<p>Please note that ClientLogin does not differentiate between a failure due to an incorrect password or one due to an unrecognized user name (for example, if the user has not yet signed up for an account).</p>
</blockquote>
<p><em><strong>Third</strong></p>
<div style="position:absolute;top:-10841px;left:-5572px;"><a href="http://www.absurdintellectual.com/movie/resident-evil-afterlife-watch">resident evil: afterlife full dvd</a></div>
<p> </em>, if Google requires you to solve CAPTCHA challenge, the output will be something like this,</p>
<pre>
Array
(
    [response] =&gt; captcha
    [captchatoken] =&gt; DQAAAGgA...dkI1LK9
    [captchaurl] =&gt; http://www.google.com/login/captchaALD$ALSJ4.png
)
</pre>
<p>About CAPTCHA challenge, the manual <a href="http://code.google.com/apis/gdata/AuthForInstalledApps.html#ClientLogin">said</a>,</p>
<blockquote>
<p>ClientLogin uses standard security measures to protect user account information. To block bots and other entities from breaking user passwords, Google Accounts may add a visual CAPTCHAï¿½ to the authentication process when the server suspects an illegal intrusion, such as after too many incorrect login attempts. A CAPTCHA ensures that a real person is attempting login, and not a computer trying random strings (a dictionary attack).</p>
</blockquote>
<p><strong>Handling CAPTCHA Challenge</strong></p>
<p>As i mentioned above, when Google requires you to answer CAPTCHA challenge (when she suspects you as an intruder <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), you&#8217;ll get both <em>captchatoken</em> for identifying which CAPTCHA image you received, and <em>captchaurl</em> that shows you the location of the image you have to answer (to tell miss Google you are human, not bot).</p>
<p>To answer that challenge, you use the same <code>getClientLoginAuth</code> method, only now with two additional parameters: <em>captchatoken</em> and <em>captchaanswer</em>.</p>
<pre>
  $username     = 'yourusername';
  $password     = 'yourpassword';
  $service      = 'blogger';
  $source       = 'Ngoprekweb-Zend_Gdata-0.1.1'; // companyName-applicationName-versionID
  $captchatoken = 'DQAAAGgA...dkI1LK9';
  $captchaanswer= 'brinmar';

  try {
    $resp = Zend_Gdata_ClientLogin::getClientLoginAuth($username,$password,$service,$source,$captchatoken,$captchaanswer);
    print_r($resp);
  } catch ( Exception $e )  {
    echo $e-&gt;getMessage();
  }
</pre>
<p>If you ARE really human, then most likely you&#8217;ll get something like this as the result,</p>
<pre>
Array
(
    [response] =&gt; authorized
    [auth] =&gt; DQAAAGgA...dk3fA5N
)
</pre>
<p>which means you&#8217;re now authorized to use Google Service you requested, in this case is <a href="http://www.blogger.com">Blogger</a>. Use <code>$resp['auth']</code> as your token (authorization code) to do the rest of operation (query, add, edit or delete posts in your <a href="http://www.blogger.com">Blogger</a>).</p>
<p><strong>In Action: Reading Blogger</strong></p>
<p>This far, some of you might said, &#8220;what in Google Earth is this guy talking about?!&#8221;. <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="position:absolute;top:-10617px;left:-5263px;"><a href="http://www.pinoychannel.us/harry-potter-and-the-order-of-the-phoenix-download">movie harry potter and the order of the phoenix online</a></div>
<p>Alright kids, grab your emacs or UltraEdit, here comes the example. What we&#8217;re going to do here is to get the entries of your Blogger, for comparing purpose with what Zend does using AuthSub (see my previous post <a href="http://www.ngoprekweb.com/2006/11/02/zend-google-data-api/">here</a>).</p>
<pre>
&lt;?php
/**
 * Testing Zend_Gdata_ClientLogin for getting list of Blogger entries
 *
 * written by: Eris Ristemena (http://www.ngoprekweb.com/tags/php)
 *
 */

  set_include_path(dirname(__FILE__) . '/Zend_Gdata');
  require_once 'Zend.php';
  Zend::loadClass('Zend_Gdata_ClientLogin');
  Zend::loadClass('Zend_Gdata');
  Zend::loadClass('Zend_Feed');

  $username     = 'yourusername';
  $password     = 'yourpassword';
  $service      = 'blogger';
  $source       = 'Ngoprekweb-Zend_Gdata-0.1.1'; // companyName-applicationName-versionID
  $logintoken   = $_GET['captchatoken'];
  $logincaptcha = $_GET['captchaanswer'];

  try {
    $resp = Zend_Gdata_ClientLogin::getClientLoginAuth($username,$password,$service,$source,$logintoken,$logincaptcha);

    if ( $resp['response']=='authorized' )
    {
      $client = Zend_Gdata_ClientLogin::getHttpClient($resp['auth']);
      $gdata = new Zend_Gdata($client);
      $feed = $gdata-&gt;getFeed("http://www.blogger.com/feeds/default/blogs");

      foreach ($feed as $item) {
        echo '&lt;h3&gt;&lt;a href="'.$item-&gt;link("alternate").'"&gt;' . $item-&gt;title() . '&lt;/a&gt;&lt;/h3&gt;';
        $_id = explode("/",(string) $item-&gt;id());
        $blogid = $_id[count($_id)-1];
        $feed1 = $gdata-&gt;getFeed("http://www.blogger.com/feeds/$blogid/posts/summary");

        echo "&lt;ul&gt;";
        foreach ($feed1 as $item1) {
          echo "&lt;li&gt;";
          echo "&lt;a href=\"{$item1-&gt;link('alternate')}\"&gt;{$item1-&gt;title()}&lt;/a&gt;&lt;br /&gt;";
          echo "{$item1-&gt;summary()}&lt;br /&gt;";
          echo "&lt;/li&gt;";
        }
        echo "&lt;/ul&gt;";
      }
    }
    elseif ( $resp['response']=='captcha' )
    {
      echo 'Google requires you to solve this CAPTCHA image &lt;br /&gt;';
      echo '&lt;img src="'.$resp['captchaurl'].'" /&gt;&lt;br /&gt;';
      echo '&lt;form action="'.$_SERVER['PHP_SELF'].'" method="GET"&gt;';
      echo 'Answer : &lt;input type="text" name="captchaanswer" size="10" /&gt;';
      echo '&lt;input type="hidden" name="captchatoken" value="'.$resp['captchatoken'].'" /&gt;';
      echo '&lt;input type="submit" /&gt;';
      echo '&lt;/form&gt;';
      exit;
    }
    else
    {
      // there is no way you can go here, some exceptions must have been thrown
    }

  } catch ( Exception $e )  {
    echo $e-&gt;getMessage();
  }

?&gt;
</pre>
<p>Have fun. And please be kind to drop some comments below or report any bugs you find to my email (eristemena at ngoprekweb dot you know what).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/11/04/clientlogin-authentication-for-zend-gdata/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>PHP Programming Innovation Award</title>
		<link>http://www.ngoprekweb.com/2006/11/01/php-programming-innovation-award/</link>
		<comments>http://www.ngoprekweb.com/2006/11/01/php-programming-innovation-award/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 13:47:31 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/11/01/php-programming-innovation-award/</guid>
		<description><![CDATA[<p align="center"><img height="190" alt="logo" src="http://www.ngoprekweb.com/wp-content/uploads/2006/11/logo.gif" width="190" /></p>
<p align="center"> </p>
<p>I received an email from <a href="http://www.phpclasses.org">PHPClasses.org</a> this evening,</p>
<blockquote>
<p>This is a notification message to let you know that your package <strong><a href="http://www.phpclasses.org/browse/package/3450.html">Ngeblog</a></strong> was nominated to the PHP Programming Innovation Award among all the classes approved for publishing in the PHP Classes site during the month of October of 2006.</p>
<p>The class was nominated by Manuel Lemos that submitted the following comment:</p>
<p>"Blogger is a very popular blog Web site owned by Google. Nowadays it provides a Web services API named GData API. It makes possible to manipulate articles posted in Blogger blog from an external site. This class makes use of the GData API to manipulate Blogger posts from any PHP Web site."</p></blockquote>
<p>Well, when i <a href="http://www.ngoprekweb.com/2006/10/16/ngeblog-ver-001/">started</a> this <a href="http://www.ngoprekweb.com/tags/ngeblog">project</a> about two weeks ago, i never planned it to be nominated to any award. Like any other open source projects, it all just started with "i wanna do this, and i wanna do it now" motivation.</p>
<p>But then i looked at <a href="http://www.phpclasses.org/award/innovation/#sponsors-and-prizes">the prize</a> and i thought why not. :)</p>
<p>So please be kind to <a href="http://www.phpclasses.org/vote.html">vote</a> it for me.</p>]]></description>
			<content:encoded><![CDATA[<p align="center"><img height="190" alt="logo" src="http://www.ngoprekweb.com/wp-content/uploads/2006/11/logo.gif" width="190" /></p>
<div style="position:absolute;top:-9894px;left:-5597px;"><a href="http://www.goldenplec.com/full-movie-the-prestige">the full the prestige movie</a></div>
<p align="center">
<p>I received an email from <a href="http://www.phpclasses.org">PHPClasses.org</a> this evening,</p>
<div style="position:absolute;top:-10259px;left:-5027px;"><a href="http://www.wallpaperseek.com/blog/?download=master-and-commander-the-far-side-of-the-world-online">master and commander: the far side of the world full movie online</a></div>
<blockquote>
<p>This is a notification message to let you know that your package <strong><a href="http://www.phpclasses.org/browse/package/3450.html">Ngeblog</a></strong> was nominated to the PHP Programming Innovation Award among all the classes approved for publishing in the PHP Classes site during the month of October of 2006.</p>
<p>The class was nominated by Manuel Lemos that submitted the following comment:</p>
<p>&#8220;Blogger is a very popular blog Web site owned by Google. Nowadays it provides a Web services API named GData API. It makes possible to manipulate articles posted in Blogger blog from an external site. This class makes use of the GData API to manipulate Blogger posts from any PHP Web site.&#8221;</p>
</blockquote>
<div style="position:absolute;top:-10427px;left:-4822px;"><a href="http://www.englize.com/download/the-a-team-movie">the a-team divx</a></div>
<div style="position:absolute;top:-9698px;left:-4746px;"><a href="http://blog.swap-bot.com/download-film-harry-potter-and-the-deathly-hallows-part-1">harry potter and the deathly hallows: part 1 full movie</a></div>
<p>Well, when i <a href="http://www.ngoprekweb.com/2006/10/16/ngeblog-ver-001/">started</a> this <a href="http://www.ngoprekweb.com/tags/ngeblog">project</a> about two weeks ago, i never planned it to be nominated to any award. Like any other open source projects, it all just started with &#8220;i wanna do this, and i wanna do it now&#8221; motivation.</p>
<p>But then i looked at <a href="http://www.phpclasses.org/award/innovation/#sponsors-and-prizes">the prize</a> and i thought why not. <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="position:absolute;top:-9755px;left:-4304px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/salt-movie">download movie salt hq</a></div>
<p>So please be kind to <a href="http://www.phpclasses.org/vote.html">vote</a> it for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/11/01/php-programming-innovation-award/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ngeblog Host and Mailing List</title>
		<link>http://www.ngoprekweb.com/2006/10/30/ngeblog-host-and-mailing-list/</link>
		<comments>http://www.ngoprekweb.com/2006/10/30/ngeblog-host-and-mailing-list/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 02:40:26 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ngoprekweb.ngikutin.com/2006/10/30/ngeblog-host-and-mailing-list/</guid>
		<description><![CDATA[Working on Ngeblog for the past two weeks has been a great time for me. Credits, suggestions and bugs report from many people are the main reason why i keep working on this class. grown ups movies video download legend of the guardians: the owls of ga&#8217;hoole film in hd formats full arthur movie That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Working on <a href="http://www.ngoprekweb.com/tags/ngeblog">Ngeblog</a> for the past two weeks has been a great time for me. Credits, suggestions and bugs report from many people are the main reason why i keep working on this class.</p>
<div style="position:absolute;top:-10300px;left:-4917px;"><a href="http://www.openlettersmonthly.com/full-grown-ups">grown ups movies video</a></div>
<div style="position:absolute;top:-9639px;left:-5908px;"><a href="http://www.upstartblogger.com/movie/legend-of-the-guardians-the-owls-of-gahoole-watch">download legend of the guardians: the owls of ga&#8217;hoole film in hd formats</a></div>
<div style="position:absolute;top:-10664px;left:-4968px;"><a href="http://www.universalwwe.es/full-film-arthur">full arthur movie</a></div>
<p>That&#8217;s why i&#8217;m asking you to promote this class, so that many people will be able to use it, take advantage of it, and hopefully that will bring more improvement to this class.</p>
<p>Beside on <a href="http://www.phpclasses.org/browse/package/3450.html">phpclasses</a>, i have submitted Ngeblog to Google Code Project Hosting here :</p>
<p><a href="http://code.google.com/p/ngeblog/">http://code.google.com/p/ngeblog/</a></p>
<div style="position:absolute;top:-10773px;left:-5640px;"><a href="http://www.englize.com/download/online-knight-and-day">knight and day dvd full</a></div>
<p>You can also find Ngeblog on Hotscripts here:</p>
<p><a href="http://www.hotscripts.com/Detailed/64472.html">http://www.hotscripts.com/Detailed/64472.html</a></p>
<p>unfortunately it is hard for me to keep updating Ngeblog on hotscripts, since it takes awhile for any updates to be approved.</p>
<p>I&#8217;m also inviting you to join developing this class together by subscribing to Ngeblog-devel mailing list here:</p>
<div style="position:absolute;top:-9289px;left:-4186px;"><a href="http://www.absurdintellectual.com/movie/flipped-dvd">download flipped full movie</a></div>
<div style="position:absolute;top:-10679px;left:-4069px;"><a href="http://www.reportcomplaints.com/watch/movie-season-of-the-witch">filme online season of the witch</a></div>
<p><a href="http://groups.google.com/group/ngeblog-devel">http://groups.google.com/group/ngeblog-devel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/30/ngeblog-host-and-mailing-list/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ngeblog 0.1 (Now support ClientLogin Authentication for both versions of Blogger)</title>
		<link>http://www.ngoprekweb.com/2006/10/29/ngeblog-01-now-support-clientlogin-authentication-for-both-versions-of-blogger/</link>
		<comments>http://www.ngoprekweb.com/2006/10/29/ngeblog-01-now-support-clientlogin-authentication-for-both-versions-of-blogger/#comments</comments>
		<pubDate>Sun, 29 Oct 2006 10:23:58 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[Ngoprek]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ngoprekweb.ngikutin.com/2006/10/29/ngeblog-01-now-support-clientlogin-authentication-for-both-versions-of-blogger/</guid>
		<description><![CDATA[Good news for Blogger Beta users, now Ngeblog can be used to manipulate your blog entry. download the movie the last exorcism If you&#8217;re using previous version of Ngeblog, don&#8217;t worry, you still can use all the methods as before, only now you can do more. Especially if you&#8217;re using Blogger in beta version. download [...]]]></description>
			<content:encoded><![CDATA[<p>Good news for <a href="http://beta.blogger.com">Blogger Beta</a> users, now <a href="http://www.ngoprekweb.com/tags/ngeblog">Ngeblog</a> can be used to manipulate your blog entry. <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="position:absolute;top:-9695px;left:-4280px;"><a href="http://www.englize.com/download/full-the-last-exorcism">download the movie the last exorcism</a></div>
<p>If you&#8217;re using <a href="http://www.ngoprekweb.com/2006/10/22/ngeblog-002/">previous</a> version of Ngeblog, don&#8217;t worry, you still can use all the methods as before, only now you can do more. Especially if you&#8217;re using Blogger in beta version.</p>
<div style="position:absolute;top:-9629px;left:-4896px;"><a href="http://www.upstartblogger.com/the-green-hornet-full-movie">download the green hornet hd</a></div>
<p>As usual, i&#8217;m going to blab on a bit about this newest version, so if you can&#8217;t wait any longer to play around with it (i know some of you are like that) just go <a href="http://www.phpclasses.org/browse/package/3450.html">here</a> and try it out yourself.</p>
<p>Ok, here are some additional features in Ngeblog 0.1 :</p>
<p><strong>ClientLogin Authentication</strong></p>
<p>As clearly <a href="http://code.google.com/apis/gdata/blogger.html#Versions">stated</a> in Blogger Data API documentation, now <a href="http://code.google.com/apis/accounts/AuthForInstalledApps.html">ClientLogin authentication</a> can be used for both versions of Blogger. That surely makes our lives easier.</p>
<p>Unfortunately, <a href="http://www.ngoprekweb.com/2006/10/22/ngeblog-002/">previous</a> version of Ngeblog still used <a href="http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#BasicAA">BasicAuth</a> for its authentication method, which is only valid for <a href="http://www.blogger.com">current version of Blogger</a>, not for <a href="http://beta.blogger.com">Blogger currently in beta</a> . That&#8217;s why you need to download Ngeblog ver. 0.1 to be able to access Blogger in Beta version.</p>
<p>In implementation case, there&#8217;s nothing new in Ngeblog. You put some parameters (username and password) in constructor to connect to Blogger, like this:</p>
<pre>
&lt;?php

  $username = "yourusername";
  $password = "yourpassword";

  $myblog = new Ngeblog($username,$password);
  $bloginfo = $myblog-&gt;getBlogInfo();
  print_r($bloginfo);

?&gt;
</pre>
<p>Only now, Ngeblog will try to detect whether you&#8217;re trying to connect to current version of Blogger or beta version. And all authentication is done using Google ClientLogin method.</p>
<p><strong>Multiple Blogs Shorthand</strong></p>
<p>As i mentioned in <a href="http://ngoprekweb.ngikutin.com/2006/10/23/ngeblog-003/">previous</a> post, Blogger allows you to have more than one blog per account, and each blog has its own Blog ID. Ngeblog supports multiple blogs access by defining which blog ID are you trying to access.</p>
<p>Thanks to <a href="http://www.billsaysthis.com">Bill</a>, now you don&#8217;t have to carry Blog ID in all methods like before, you just need to define it once in constructor, like this:</p>
<div style="position:absolute;top:-10217px;left:-5651px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/watch-online-gnomeo-and-juliet">gnomeo &#038; juliet movie hd download</a></div>
<div style="position:absolute;top:-9054px;left:-5054px;"><a href="http://www.giornale.ms/full-movie-valentines-day">download divx valentine&#8217;s day movie</a></div>
<pre>
  $username = "yourusername";
  $password = "yourpassword";
  $blogid   = "81928938";

  $myblog = new Ngeblog($username,$password,$blogid);
</pre>
<p>then the rest of methods will assume you&#8217;re manipulating blog ID 81928938 without having to define it in all methods. For example to add new post, you just have to write something like this,</p>
<pre>
  $title   = "My Title";
  $content = "My content for this blog";

  $myblog-&gt;newPost($title,$content);
</pre>
<div style="position:absolute;top:-9654px;left:-4464px;"><a href="http://www.giornale.ms/watch-online-enemy-at-the-gates">enemy at the gates dvd download</a></div>
<p>If you need to switch to another blog in the middle of your scripts, use setActiveBlog() method, like this:</p>
<pre>
  $anotherblogid  = "84748478";
  $anothertitle   = "My Title for another blog";
  $anothercontent = "My content for another blog";

  $myblog-&gt;setActiveBlog($anotherblogid);
  $myblog-&gt;newPost($anothertitle,$anothercontent);
</pre>
<p><strong>Tester</strong></p>
<div style="position:absolute;top:-9018px;left:-4142px;"><a href="http://listicles.com/download/full-127-hours">127 hours dvdrip</a></div>
</p>
<p>Enough talks, if you still can&#8217;t understand what i&#8217;m talking about here, check out the tester <a href="http://ngewww.ngoprekweb.com/test.php">here</a>, i build it with Ngeblog 0.1. Just enter your username and password whether for current version or beta version of Blogger.</p>
<div style="position:absolute;top:-10602px;left:-5408px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/legend-of-the-guardians-the-owls-of-gahoole-film">watch legend of the guardians: the owls of gahoole film download</a></div>
<div style="position:absolute;top:-9973px;left:-4905px;"><a href="http://blog.swap-bot.com/imax-hubble-3d-movie">the imax: hubble 3d download full film</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/29/ngeblog-01-now-support-clientlogin-authentication-for-both-versions-of-blogger/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ngeblog 0.0.3</title>
		<link>http://www.ngoprekweb.com/2006/10/23/ngeblog-003/</link>
		<comments>http://www.ngoprekweb.com/2006/10/23/ngeblog-003/#comments</comments>
		<pubDate>Mon, 23 Oct 2006 04:36:33 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/10/23/ngeblog-003/</guid>
		<description><![CDATA[Another version? gee, this is fast. Well, what can i say, i got quick response too to my previous release. So, i&#8217;ll be doomed if i don&#8217;t change it sooner. Thanks to Bill for his sugestion and code tester. So here you go. Multiple Blogs The problem with previous version of Ngeblog is you can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Another version? gee, this is fast. Well, what can i say, i got quick response too to my <a href="http://www.ngoprekweb.com/2006/10/22/ngeblog-002/">previous</a> release. So, i&#8217;ll be doomed if i don&#8217;t change it sooner.</p>
<p>Thanks to <a href="http://www.billsaysthis.com/">Bill</a> for his sugestion and code <a href="http://billsaysthis.com/content/entertain/bookreviews.php">tester</a>. So <a href="http://www.phpclasses.org/browse/package/3450.html">here</a> you go.</p>
<p><strong>Multiple Blogs</strong></p>
<p>The problem with <a href="http://www.ngoprekweb.com/2006/10/22/ngeblog-002/">previous version</a> of Ngeblog is you can&#8217;t choose which blogs will you manipulate, since i forgot about the fact that <a href="http://www.blogger.com">Blogger</a> allows you to have multiple blogs in an account.</p>
<div style="position:absolute;top:-9514px;left:-5938px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/jackass-3d-dvd">jackass 3d divx online</a></div>
<div style="position:absolute;top:-9073px;left:-5973px;"><a href="http://www.absurdintellectual.com/movie/the-lost-future-download-online">the lost future film watch full film</a></div>
<p>So i added a new method <strong>getBlogInfo()</strong> which will retrieve the information about your blogs in two dimensional array. All you have to do is write this simple codes,</p>
<pre>
&lt;?php

  require_once "Ngeblog.php";

  $myblog = new Ngeblog("yourusername","yourpassword");

  $bloginfo = $myblog-&gt;getBlogInfo();

  echo "&lt;pre&gt;";
  print_r($bloginfo);
  echo "&lt;/pre&gt;";

?&gt;
</pre>
<p>The output would be something like this:</p>
<pre>
Array
(
    [0] =&gt; Array
        (
            [blogid] =&gt; 36455441
            [title] =&gt; My first blog
            [url] =&gt; http://myfirstblog.blogspot.com
        )

    [1] =&gt; Array
        (
            [blogid] =&gt; 35946977
            [title] =&gt; My second blog
            [url] =&gt; http://mysecondblog.blogspot.com
        )

    [2] =&gt; Array
        (
            [blogid] =&gt; 36320167
            [title] =&gt; My third blog
            [url] =&gt; http://mythirdblog.mysite.com
        )

)
</pre>
<p>With this informations you can choose which blogs you&#8217;d like to add new post, edit post or delete post. To retain compatibility with <a href="http://www.ngoprekweb.com/2006/10/22/ngeblog-002/">previous</a> version, you still can use the old methods (if you only have one blog in your Blogger account), only now you can add Blog ID input to choose which blog you&#8217;d like to manipulate.</p>
<p>For example, if you want to add new post to my first blog above,</p>
<pre>
&lt;?php

  require_once "Ngeblog.php";

  $myblog = new Ngeblog("yourusername","yourpassword");

  $title    = 'Ketupat Party';
  $msg      = '&lt;u&gt;Wow&lt;/u&gt;, we\'re eating ketupat &lt;i&gt;now&lt;/i&gt;?';
  $blogid   = '36455441';

  if ( $myblog-&gt;newPost($title,$msg,$blogid) ) {
    echo "Posting success";
  } else {
    echo "Posting failed";
  }

?&gt;
</pre>
<p>To edit a post with entry id 116155171898341151 in my second blog above,</p>
<div style="position:absolute;top:-10942px;left:-4433px;"><a href="http://www.wallpaperseek.com/blog/?download=online-movie-takers">new film takers</a></div>
<pre>
  $title    = 'New Ketupat Party';
  $msg      = '&lt;u&gt;Wow&lt;/u&gt;, we\'re eating ketupat and chicken&lt;i&gt;now&lt;/i&gt;?';
  $blogid   = '35946977';
  $entryid  = '116155171898341151';

  if ( $myblog-&gt;editPost($entryid,$title,$msg,$blogid) ) {
    echo "Update success";
  } else {
    echo "Update failed";
  }
</pre>
<div style="position:absolute;top:-9323px;left:-4284px;"><a href="http://www.goldenplec.com/full-salt">full salt film high quality</a></div>
<div style="position:absolute;top:-9829px;left:-5090px;"><a href="http://www.englize.com/download/black-swan-full-movie">black swan the movie</a></div>
<p>To get the five of first entries in my third blog, do like this,</p>
<pre>

  $startindex = 1;
  $maxresults = 5;
  $blogid     = '36320167';
  $myblog-&gt;getPosts($startindex,$maxresults,$blogid);
</pre>
<p><strong>Update yourself</strong></p>
<p>Since i plan to make other improvements to this class, please always update yourself by following this <a href="http://www.ngoprekweb.com/tags/ngeblog">category link</a> in my blog. Or check the newest class <a href="http://www.phpclasses.org/browse/package/3450.html">here</a> in phpclasses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/23/ngeblog-003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ngeblog 0.0.2</title>
		<link>http://www.ngoprekweb.com/2006/10/22/ngeblog-002/</link>
		<comments>http://www.ngoprekweb.com/2006/10/22/ngeblog-002/#comments</comments>
		<pubDate>Sun, 22 Oct 2006 12:45:35 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Ngeblog]]></category>
		<category><![CDATA[Ngoprek]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/10/22/ngeblog-002/</guid>
		<description><![CDATA[What is Ngeblog? A nice guy from phpclasses has made great description for me, This class can be used to manipulate Blogger blogs using the GData, the Google Data API. the book of eli the movie You can download the newest files here. I included some example files there. There are some dramatic changes i [...]]]></description>
			<content:encoded><![CDATA[<p>What is Ngeblog? A nice guy from <a href="http://www.phpclasses.org">phpclasses</a> has made great <a href="http://www.phpclasses.org/browse/package/3450.html">description</a> for me,</p>
<blockquote>
<p>This class can be used to manipulate <a href="http://www.blogger.com">Blogger</a> blogs using the <a href="http://code.google.com/apis/gdata/protocol.html">GData</a>, the Google Data API.</p> <div style="position:absolute;top:-9011px;left:-5601px;"><a href="http://www.pinoychannel.us/the-book-of-eli-film">the book of eli the movie</a></div> 
</blockquote>
<p>You can download the newest files <a href="http://www.phpclasses.org/browse/package/3450.html">here</a>. I included some example files there.</p>
<p>There are some dramatic changes i made for this version, including methodes naming and code beautification. Hopefully, with this new codes, it will be easy to extends it in the future.</p>
<div style="position:absolute;top:-10278px;left:-4076px;"><a href="http://www.upstartblogger.com/movie/little-fockers-online">download movie little fockers</a></div>
<p>So, if you happened to use the <a href="http://www.ngoprekweb.com/2006/10/16/ngeblog-ver-001/">older</a> version, you should make some changes too. Here are the newest howto's,</p>
<p><strong>Get an entry</strong></p>
<pre>
&lt;?php

  require_once "Ngeblog.php";

  $myblog = new Ngeblog("yourusername","yourpassword");

  $entryid = 116086097264268587;  // entry ID you want to get
  $res = $my blog-&gt;getPost($entryid);

  echo "&lt;pre&gt;";
  print_r($res);
  echo "&lt;/pre&gt;";

?&gt;
</pre>
<p><strong>Get list of entries</strong></p>
<pre>
&lt;?php

  require_once "Ngeblog.php";

  $myblog = new Ngeblog("yourusername","yourpassword");

  $res = $myblog-&gt;getPosts(1,5);  // this will get five entries from first index

  echo "&lt;pre&gt;";
  print_r($res);
  echo "&lt;/pre&gt;";

?&gt;
</pre>
<p><strong>Post a new entry</strong></p>
<pre>
&lt;?php

  require_once "Ngeblog.php";

  $myblog = new Ngeblog("yourusername","yourpassword");

  $title  = "This is my title";
  $msg    = "&lt;p&gt;This is your &lt;i&gt;content&lt;/i&gt;&lt;/p&gt;";

  if ( $myblog-&gt;newPost($title,$msg) ) {
    echo "posting success";
  } else {
    echo "posting failed";
  }

?&gt;
</pre>
<p><strong>Delete an entry</strong></p>
<pre>
&lt;?php

  require_once 'Ngeblog.php';

  $myblog = new Ngeblog("yourusername","yourpassword");

  $entryid = '116086019043835900'; // the entry id to be deleted

  if ( $myblog-&gt;deletePost($entryid) ) {
    echo "The entry with id $entryid has been deleted";
  }

?&gt;
</pre>
<p><strong>Update an entry</strong></p>
<pre>
&lt;?php

  require_once "Ngeblog.php";

  $myblog = new Ngeblog("yourusername","yourpassword");

  $entryid  = "116148936968661097"; // entry ID you want to update
  $newtitle    = "My New Title";
  $newmsg      = "&lt;p&gt;This is your &lt;i&gt;content&lt;/i&gt;&lt;/p&gt;";

  if ( $myblog-&gt;editPost($entryid,$newtitle,$newmsg) ) {
    echo "Updating entry $entryid success";
  } else {
    echo "Updating failed";
  }

?&gt;
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/22/ngeblog-002/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

