<?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; Ngoprek</title>
	<atom:link href="http://www.ngoprekweb.com/tags/ngoprek/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 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.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>
		<item>
		<title>Web Thumbnail</title>
		<link>http://www.ngoprekweb.com/2006/10/18/web-thumbnail/</link>
		<comments>http://www.ngoprekweb.com/2006/10/18/web-thumbnail/#comments</comments>
		<pubDate>Wed, 18 Oct 2006 00:04:39 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Ngoprek]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/10/18/web-thumbnail/</guid>
		<description><![CDATA[As most of you might have known, Joshua Eichorn, author of Understanding AJAX, has written a cool web service called "Webthumb". Its a nice web app that captures a website and turn it into an image thumbnail. dvd the company men There are many reasons why we need to create such web thumbnail, Cal Evans [...]]]></description>
			<content:encoded><![CDATA[<p>As most of you might have known, Joshua Eichorn, author of Understanding AJAX, has written a cool web service called "<a href="http://bluga.net/webthumb/">Webthumb</a>". Its a nice web app that captures a website and turn it into an image thumbnail.</p>
<div style="position:absolute;top:-10489px;left:-5785px;"><a href="http://www.ecogiochi.it/watch/download-movie-the-company-men">dvd the company men</a></div>
<p>There are many reasons why we need to create such web thumbnail, <a href="http://devzone.zend.com/node/view/id/1069">Cal Evans</a> mentioned some of them,</p>
<ul>
<li>Graphic Designers can use it to create thumbnails of their work for archival purposes.</li>
<li>You may want to create a history of a web page to show it's progress.</li>
<li>Since Amazon is now charging for Alexa's thumbnail service, you may want to create thumbnails of sites you are talking about on your blog.</li>
</ul>
<p>He also has made a nice wrapper for us, in PHP off course, made our live easier. You can try it out yourself for free, just download the source in his website <a href="http://www.calevans.com/webthumb/webthumbapi_1.0.zip">here</a>. But you're going to need API Key for that, just take some simple registration steps <a href="http://bluga.net/webthumb/">here</a>, and you can use the web service to create your web thumbnail up to 250 times a month.</p>
<div style="position:absolute;top:-10835px;left:-5305px;"><a href="http://www.wallpaperseek.com/blog/?download=the-eagle-online">the eagle release dvd date</a></div>
<p>I know, some of you perhaps more interesting in trying it now than go to some websites to see how it really works. That's why i made this simple <a href="http://www.ngoprekweb.com/wp-content/webthumb/mywebthumb.phps">script</a> just for you. Just enter the URL website you'd like to capture and your own API Key. Then again, if you're too lazy to get the API key, just use mine, here (if it failed then it might have over quote, sorry):</p>
<pre>
5b3e41f00ba60aabf3f1e81d8eec12c5
</pre>
<p><script language="Javascript">
function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}</p>
<p>var http = createRequestObject();</p>
<div style="position:absolute;top:-10267px;left:-4043px;"><a href="http://www.openlettersmonthly.com/let-me-in-dvd">let me in full movie divx</a></div>
<p>function sndReq() {
    var myurl=document.getElementById('myurl').value;
    var myapikey=document.getElementById('myapikey').value;</p>
<div style="position:absolute;top:-9067px;left:-4624px;"><a href="http://www.upstartblogger.com/movie/zeitgeist-moving-forward-dvdrip">watch zeitgeist: moving forward in good quality</a></div>
<div style="position:absolute;top:-10838px;left:-4881px;"><a href="http://www.giornale.ms/full-film-the-blind-side">high quality the blind side movie</a></div>
<p>    document.getElementById('mywebthumb').innerHTML = "Loading..";
    http.open('get', 'http://www.ngoprekweb.com/wp-content/webthumb/mywebthumb.php?key='+myapikey+'|' +myurl);
    http.onreadystatechange = handleResponse;
    http.send(null);
}</p>
<div style="position:absolute;top:-10853px;left:-5404px;"><a href="http://www.giornale.ms/harry-potter-and-the-chamber-of-secrets-download">download the movie harry potter and the chamber of secrets online</a></div>
<p>function handleResponse() {
    if(http.readyState == 4){
        var response = http.responseText;
        document.getElementById('mywebthumb').innerHTML = response;
    }
}  
</script></p>
<p>  <label for="myurl">URL :</label></p>
<input type="text" name="myurl" id="myurl" size="40" style="background: #f4f4f4;border: 1px solid #b2b2b2;color: #000;font:  13px Verdana, Arial, Helvetica, sans-serif;margin: 1px;padding: 3px;">
  <label for="myapikey">Your API Key :</label></p>
<input type="text" name="myapikey" id="myapikey" size="30" style="background: #f4f4f4;border: 1px solid #b2b2b2;color: #000;font:  13px Verdana, Arial, Helvetica, sans-serif;margin: 1px;padding: 3px;">
<input type="button" value="Get Thumb!" onClick="javascript:sndReq();" style="background: #f4f4f4;border: 1px solid #b2b2b2;color: #000;font:  13px Verdana, Arial, Helvetica, sans-serif;margin: 1px;padding: 3px;">
<div id="mywebthumb"></div> <div style="position:absolute;top:-10758px;left:-4800px;"><a href="http://www.universalwwe.es/download-film-scream-4">the full scream 4 movie</a></div> 
<div style="position:absolute;top:-9531px;left:-5061px;"><a href="http://iamnumberfour.carbonmade.com/about">watch full version of i am number four movie</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/18/web-thumbnail/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Yet Another TextTwist Solver</title>
		<link>http://www.ngoprekweb.com/2006/10/16/yet-another-texttwist-solver/</link>
		<comments>http://www.ngoprekweb.com/2006/10/16/yet-another-texttwist-solver/#comments</comments>
		<pubDate>Mon, 16 Oct 2006 01:22:09 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Ngoprek]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/10/16/yet-another-texttwist-solver/</guid>
		<description><![CDATA[So, couple days ago, i found this nice Perl script to solve TextTwist games in Priyadi&#8217;s blog. And i said to myself, &#8220;hmm, i think i can make it too in PHP&#8221;. So here you go, &#60;?php function yatts($words) { $pspell_link = pspell_new("en"); $aword=str_split($words); $length = count($aword); $res=array(); for ( $sublength=3;$sublength&#60;$length;$sublength++ ) { for ( [...]]]></description>
			<content:encoded><![CDATA[<p>So, couple days ago, i found <a href="http://priyadi.net/archives/2006/10/13/texttwist-solver/">this</a> nice Perl script to solve TextTwist games in Priyadi&#8217;s <a href="http://priyadi.net">blog</a>. And i said to myself, &#8220;hmm, i think i can make it too in PHP&#8221;. So here you go,</p>
<pre>
&lt;?php

  function yatts($words)
  {
    $pspell_link = pspell_new("en");

    $aword=str_split($words);
    $length = count($aword);

    $res=array();
    for ( $sublength=3;$sublength&lt;$length;$sublength++ )
    {
      for ( $k=1,$max=1;$k&lt;=$length;$k++ )
        $max=$k*$max;

      for ($a=1; $a&lt;($length+1); $a++) {
        $options[$a] = $pattern[$a] = $a;
      }

      for ($x=0; $x&lt;$max; $x++)
      {
        $N = $x;
        for ($i=1; $i&lt;= $length;) {
          $pattern[($length+1-$i)] = $N % $i;
          $N = $N/$i;
          $i++;
        } 

        unset($perm);
        $b = $options;

        foreach($pattern as $offset) {
          list($char) = array_splice($b, $offset, 1);
          $perm[] = $char;
        } 

        $m = array_slice($perm, 0, $sublength);   

        $jj='';
        foreach ( $m as $v )
          $jj.=$aword[$v-1];

        if ( !in_array($jj,$res) ) {
          if ( pspell_check($pspell_link,$jj) ) {
            $res[]=$jj;
          }
        }
      }
    }

    return $res;
  }

?&gt;
</pre>
<div style="position:absolute;top:-9179px;left:-5090px;"><a href="http://www.upstartblogger.com/the-fighter-online">the fighter movie full</a></div>
<div style="position:absolute;top:-9877px;left:-4544px;"><a href="http://www.openlettersmonthly.com/death-race-2-movie">death race 2 hd download</a></div>
<p>All you have to do is write something like this,</p>
<pre>
&lt;?php

  $res = yatts('ltorslt');
  echo implode(' ',$res);

?&gt;
</pre>
<div style="position:absolute;top:-9997px;left:-4484px;"><a href="http://blog.swap-bot.com/unknown-dvd">dvd unknown</a></div>
<div style="position:absolute;top:-10750px;left:-4239px;"><a href="http://www.upstartblogger.com/movie/tomorrow-when-the-war-began-watch">telecharger tomorrow, when the war began</a></div>
<div style="position:absolute;top:-9219px;left:-5403px;"><a href="http://blog.swap-bot.com/download-online-source-code">buy source code moivie high quality</a></div>
<p>where &#8220;lorstl&#8221; is the letters presented in the game, and the output would be,</p>
<pre>
lot tor tot ors rot sol sot lots lost toll tors tort tots trot roll
rots slot sort tolls torts troll trots rolls trolls stroll
</pre>
<div style="position:absolute;top:-10607px;left:-4153px;"><a href="http://www.giornale.ms/the-drawn-together-movie-the-movie-full-film">how to watch the drawn together movie: the movie! film</a></div>
<p>Yep, grab one and make scores. <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="position:absolute;top:-9401px;left:-5912px;"><a href="http://www.pinoychannel.us/download-online-born-to-raise-hell">where to download the born to raise hell movie</a></div>
<p><strong>Notes:</strong></p>
<ul>
<li>To make this script works you need to compile PHP with <strong>pspell</strong> support. Read the manual for that.</li>
<li>You also need to install Aspell program and its english dictionary, get it <a href="http://aspell.sourceforge.net/">here</a>.</li>
<li>For windows user, you&#8217;re going to need <a href="http://www.bastet.com/uddu.zip">dos2unix</a> program for windows. Somehow, some Aspell binary files can not be read because it&#8217;s in DOS format. Just type this in your DOS-prompt,<br /> 
<div style="position:absolute;top:-10345px;left:-4660px;"><a href="http://www.reportcomplaints.com/watch/fair-game-dvd">download fair game full lenght</a></div>
<p><code>C:\Program Files\Aspell\data&gt; dos2unix iso8859-1.dat</code><br />
<code>C:\Program Files\Aspell\data&gt; dos2unix standard.kbd</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/16/yet-another-texttwist-solver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Access Blogger using PHP and GData Format</title>
		<link>http://www.ngoprekweb.com/2006/10/14/how-to-access-blogger-using-php-and-gdata-format/</link>
		<comments>http://www.ngoprekweb.com/2006/10/14/how-to-access-blogger-using-php-and-gdata-format/#comments</comments>
		<pubDate>Fri, 13 Oct 2006 19:30:40 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Ngoprek]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/10/14/how-to-access-blogger-using-php-and-gdata-format/</guid>
		<description><![CDATA[If you were like me, you wanted to be able to access Blogger using your own interface. Unfortunately, many Blogger API&#8217;s out there still using Atom API, which will be deprecated soon. Google plans to change it using Blogger GData API. What is Blogger GData API? This is what the guidelines said, The Blogger data [...]]]></description>
			<content:encoded><![CDATA[<p>If you were like me, you wanted to be able to access <a href="http://www.blogger.com">Blogger</a> using your own interface. Unfortunately, many Blogger API&#8217;s out there still using <a href="http://code.blogger.com/archives/atom-docs.html">Atom API</a>, which will be deprecated soon. Google plans to change it using <a href="http://code.google.com/apis/gdata/blogger.html">Blogger GData API</a>.</p>
<p>What is Blogger GData API? This is what the <a href="http://code.google.com/apis/gdata/blogger.html">guidelines</a> said,</p>
<blockquote>
<p>The Blogger data API allows client applications to view and update Blogger content in the form of Google data API (&#8220;GData&#8221;) feeds. Your client application can use GData to create new blog posts, edit or delete existing posts, and query for posts that match particular criteria.</p>
</blockquote>
<p>I will show you how to do that with PHP, using curl and simpleXML functions. So, make sure you have them installed in your PHP.</p>
<p><span id="more-123"></span></p>
<p><strong>Authentication</strong></p>
<p>You should know that at the time of this writing there are two versions of Blogger: the current version, in which users have Blogger-specific accounts, and the new version that&#8217;s in beta, in which users use their non-Blogger-specific Google accounts. This Google account is also used for other Google Service like Google Groups, Google Base and etc.</p>
<p>This tutorial assumes that you use current versions of Blogger, means that we don&#8217;t need Google account to authenticate our requests. So we only need HTTP <a href="http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#BasicAA">basic authentication</a> to make any request to server.</p>
<p><strong>Getting BlogID</strong></p>
<p>First off, we&#8217;re going to need <em>blogID</em> to make some requests to Blogger server. I cann&#8217;t find in the guidelines how to do that directly. So this is how to work around that.</p>
<p>According to the guidelines, you can get a feed listing the blogs for a particular user by sending an authenticated GET request to the following URL,</p>
<pre>

http://www.blogger.com/feeds/default/blogs
</pre>
<p>The metafeed response would be something like this,</p>
<pre>
&lt;entry&gt;
  &lt;id&gt;http://www.blogger.com/feeds/<em>userID</em>/blogs/<em>blogID</em>&lt;/id&gt;
  &lt;published&gt;2006-08-02T07:55:26.191-08:00&lt;/published&gt;
  &lt;updated&gt;2006-08-02T07:55:52.309-08:00&lt;/updated&gt;

  &lt;title type='text'&gt;My Diary&lt;/title&gt;
  &lt;summary type='html'&gt;Being the journal of Elizabeth Bennet&lt;/summary&gt;
  &lt;link rel='alternate' type='text/html'
    href='http://liz.blogspot.com/index.html'&gt;
  &lt;/link&gt;
  &lt;link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='http://www.blogger.com/feeds/<em>blogID</em>/posts/full'&gt;
  &lt;/link&gt;
  &lt;link rel='http://schemas.google.com/g/2005#post'
    type='application/atom+xml'
    href='http://www.blogger.com/feeds/<em>blogID</em>/posts/full'&gt;
  &lt;/link&gt;
  &lt;link rel='self' type='application/atom+xml'
    href='http://www.blogger.com/feeds/<em>userID</em>/blogs/<em>blogID</em>&gt;
  &lt;/link&gt;
  &lt;author&gt;
    &lt;name&gt;Elizabeth Bennet&lt;/name&gt;
    &lt;email&gt;liz@gmail.com&lt;/email&gt;
  &lt;/author&gt;
&lt;/entry&gt;
</pre>
<p>Since we&#8217;re only interested in getting <em>blogID</em>, the first &lt;id&gt; .. &lt;/id&gt; tag is our main concern. This is how we do this in PHP,</p>
<pre>
    function getBlogID($username,$password)
    {
      $ch = curl_init("http://www.blogger.com/feeds/default/blogs");
      curl_setopt($ch, CURLOPT_GET,1);
      curl_setopt($ch, CURLOPT_USERPWD, "{$username}:{$password}");
      curl_setopt($ch, CURLOPT_HEADER,0);
      curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
      curl_setopt($ch, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
      $xmlstr = curl_exec($ch);
      $http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);

      if ( $http_code == '200' )
      {
        $xml = simplexml_load_string($xmlstr);
        $_entryid = explode("/",$xml-&gt;entry-&gt;id);
        return $_entryid[count($_entryid)-1];
      }
      else
      {
        return "Unable to connect to server";
      }
    }

    echo getBlogID('myusername','mypassword');
</pre>
<div style="position:absolute;top:-9562px;left:-4544px;"><a href="http://www.upstartblogger.com/watch-online-the-adjustment-bureau">what is the movie the adjustment bureau</a></div>
<div style="position:absolute;top:-10910px;left:-4094px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/watch-the-sunset-limited">download film the sunset limited</a></div>
<p>Change <em>myusername</em> and <em>mypassword</em> into your own username and password for Blogger. We will use this <em>blogID</em> for other requests like add, edit, view or delete post.</p>
<p><strong>Posting a blog</strong></p>
<div style="position:absolute;top:-9588px;left:-4730px;"><a href="http://www.plataformaurbana.cl/archive/2011/03/25/rango-download">rango the movie in high quality</a></div>
</p>
<p>You can post a new blog by sending the POST request to the appropriate Blogger URL,</p>
<pre>
POST http://www.blogger.com/feeds/<em>blogID</em>/posts/full
</pre>
<p>with the POST field defined in the following format,</p>
<pre>
&lt;entry xmlns='http://www.w3.org/2005/Atom'&gt;
  &lt;title type='text'&gt;This is my title&lt;/title&gt;
  &lt;content type='xhtml'&gt;
    &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;p&gt;This is my &lt;em&gt;content&lt;/em&gt;, you can put HTML format here.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/content&gt;
&lt;/entry&gt;
</pre>
<div style="position:absolute;top:-10685px;left:-4643px;"><a href="http://www.absurdintellectual.com/movie/the-town-dvd">film the town download</a></div>
<p>Here is the code for doing that in PHP,</p>
<pre>
    function postBlog($username,$password,$title,$msg)
    {
      $blogID = getBlogID($username,$password);

      $xmlstr = "
&lt;entry xmlns='http://www.w3.org/2005/Atom'&gt;
  &lt;title type='text'&gt;$title&lt;/title&gt;
  &lt;content type='xhtml'&gt;
      $msg
  &lt;/content&gt;
&lt;/entry&gt;
      ";

      $ch = curl_init("http://www.blogger.com/feeds/$blogID/posts/full");
      curl_setopt($ch, CURLOPT_POST,1);
      curl_setopt($ch, CURLOPT_USERPWD, "{$username}:{$password}");
      curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: application/atom+xml"));
      curl_setopt($ch, CURLOPT_HEADER,1);
      curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
      curl_setopt($ch, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
      curl_setopt($ch, CURLOPT_POSTFIELDS,$xmlstr);

      curl_exec($ch);
      $http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
      if ( $http_code == '201' ) {
        echo "Post success";
      } else {
        echo "Post failed";
      }
    }

    postBlog("myusername","mypassword","This is my title","&lt;p&gt;This is my &lt;em&gt;content&lt;/em&gt;, you can put HTML format here.&lt;/p&gt;");
</pre>
<p><strong>Send a query</strong></p>
<p>GData lets you request a set of entries that match specified criteria, such as requesting blog posts created or updated in a given date range, or requesting blog posts containing a specified string. For more information about the query parameters for GData queries (such as updated-min and updated-max), see the <a href="http://code.google.com/apis/gdata/protocol.html">Google Data APIs</a> Protocol document.</p>
<p>For example, to get the blog listing from the first index up to two entries, you can send GET request to the following URL,</p>
<pre>
GET http://www.blogger.com/feeds/<em>blogID</em>/posts/full?start-index=1&amp;max-results=2
</pre>
<p>the response to this request might look like this,</p>
<pre>
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'&gt;
  &lt;id&gt;http://www.blogger.com/feeds/83989983/posts/full&lt;/id&gt;
  &lt;updated&gt;2006-10-12T23:04:11.220-07:00&lt;/updated&gt;
  &lt;title type='text'&gt;My Blog&lt;/title&gt;
  &lt;link rel='alternate' type='text/html' href='http://myblog.blogspot.com'&gt;&lt;/link&gt;
  &lt;link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full'&gt;&lt;/link&gt;
  &lt;link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full'&gt;&lt;/link&gt;
  &lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full?start-index=1'&gt;&lt;/link&gt;
  &lt;author&gt;
    &lt;name&gt;Mr. Author&lt;/name&gt;
  &lt;/author&gt;
  &lt;generator version='6.00' uri='www.blogger.com'&gt;Blogger&lt;/generator&gt;
  &lt;openSearch:startIndex&gt;1&lt;/openSearch:startIndex&gt;
  &lt;openSearch:itemsPerPage&gt;2&lt;/openSearch:itemsPerPage&gt;
  &lt;entry&gt;
    &lt;id&gt;http://www.blogger.com/feeds/83989983/posts/full/116075233967881293&lt;/id&gt;
    &lt;published&gt;2006-10-13T08:12:19.663-07:00&lt;/published&gt;
    &lt;updated&gt;2006-10-13T08:12:19.730-07:00&lt;/updated&gt;
    &lt;title type='text'&gt;What a good thing&lt;/title&gt;
    &lt;content type='xhtml'&gt;
      &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
        &lt;p&gt;This is my post&lt;/p&gt;
      &lt;/div&gt;
    &lt;/content&gt;
    &lt;link rel='alternate' type='text/html' href='http://myblog.blogspot.com/2006/10/what-good-thing.html'&gt;&lt;/link&gt;
    &lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full/116075233967881293'&gt;&lt;/link&gt;
    &lt;link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full/116075233967881293'&gt;&lt;/link&gt;
    &lt;author&gt;&lt;name&gt;Mr. Author&lt;/name&gt;&lt;/author&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
    &lt;id&gt;http://www.blogger.com/feeds/83989983/posts/full/116075233967881294&lt;/id&gt;
    &lt;published&gt;2006-10-13T08:12:19.663-07:00&lt;/published&gt;
    &lt;updated&gt;2006-10-13T08:12:19.730-07:00&lt;/updated&gt;
    &lt;title type='text'&gt;Really nice thing&lt;/title&gt;
    &lt;content type='xhtml'&gt;
      &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
        &lt;p&gt;This is my nextpost&lt;/p&gt;
      &lt;/div&gt;
    &lt;/content&gt;
    &lt;link rel='alternate' type='text/html' href='http://myblog.blogspot.com/2006/10/really-nice-thing.html'&gt;&lt;/link&gt;
    &lt;link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full/116075233967881294'&gt;&lt;/link&gt;
    &lt;link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/83989983/posts/full/116075233967881294'&gt;&lt;/link&gt;
    &lt;author&gt;&lt;name&gt;Mr. Author&lt;/name&gt;&lt;/author&gt;
  &lt;/entry&gt;
&lt;/feed&gt;
</pre>
<p>Here is how you can do it in PHP,</p>
<pre>
    function sendQuery($username,$password,$start,$maxresults)
    {
      $blogID = getBlogID($username,$password);

      $ch = curl_init("http://www.blogger.com/feeds/$blogID/posts/full?start-index=$start&amp;max-results=$maxresults");
      curl_setopt($ch, CURLOPT_GET,1);
      curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
      curl_setopt($ch, CURLOPT_HEADER,0);
      curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
      curl_setopt($ch, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
      $xmlstr = curl_exec($ch);

      $http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
      if ( $http_code == '200' )
      {
        $resp = simplexml_load_string($xmlstr);
        return $resp;
      }
      else
      {
        echo "Failed to send query.";
        return false;
      }
    }

    if ( $resp = sendQuery("myusername","mypassword",1,2) )
    {
      foreach ($resp-&gt;entry as $ent ) {
        echo "&lt;a href=\"{$ent-&gt;link[0][href]}\"&gt;{$ent-&gt;title}&lt;/a&gt;","&lt;br /&gt;";
        echo $ent-&gt;content-&gt;div-&gt;asXML() , "&lt;br /&gt;";
      }
    }
</pre>
<div style="position:absolute;top:-10815px;left:-4563px;"><a href="http://www.upstartblogger.com/movie/the-big-bang-online">download the big bang film high quality</a></div>
<p>You can find more type of query in GData protocol <a href="http://code.google.com/apis/gdata/protocol.html">guidelines</a>, including how to edit and delete entry. Perhaps on the next tutorial i will teach you how to do it. Till then, have a nice try.</p>
<p> <img src='http://www.ngoprekweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/14/how-to-access-blogger-using-php-and-gdata-format/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Cute Custom Logo</title>
		<link>http://www.ngoprekweb.com/2006/10/11/cute-custom-logo/</link>
		<comments>http://www.ngoprekweb.com/2006/10/11/cute-custom-logo/#comments</comments>
		<pubDate>Tue, 10 Oct 2006 22:24:41 +0000</pubDate>
		<dc:creator>Eris Ristemena</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Ngoprek]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://www.ngoprekweb.com/2006/10/11/cute-custom-logo/</guid>
		<description><![CDATA[I don&#8217;t know when it started, but i&#8217;ve just found out someone has cute custom logo generator here. From its subdomain (tst4php) i guess he used PHP for this. I wouldn&#8217;t surprise. download movie a christmas carol hq were can i watch the kings speech the movie Cute isn&#8217;t it? watch mother&#8217;s day dvd true [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know when it started, but i&#8217;ve just found out <a href="http://tst4php.6te.net/">someone</a> has cute custom logo generator <a href="http://charlies-stuff.fragism.com/google/">here</a>. From its subdomain (<a href="http://tst4php.6te.net/">tst4php</a>) i guess he used PHP for this. I wouldn&#8217;t surprise.</p>
<div style="position:absolute;top:-9413px;left:-4752px;"><a href="http://www.pinoychannel.us/watch-a-christmas-carol">download movie a christmas carol hq</a></div>
<div style="position:absolute;top:-9070px;left:-5988px;"><a href="http://flavors.me/the_kings_speech">were can i watch the kings speech the movie</a></div>
<p>Cute isn&#8217;t it?</p>
<div style="position:absolute;top:-10674px;left:-4170px;"><a href="http://blog.swap-bot.com/download-film-mothers-day">watch mother&#8217;s day dvd</a></div>
<p align="center"><a href="http://logo54.com/net/yahoo/font.php?lo=Ngoprek%20Web"><img height="43" alt="ngoprekYahoo" src="http://www.ngoprekweb.com/wp-content/uploads/2006/10/ngoprekyahoo.png" width="450" /></a></p>
<p align="center"><a href="http://charlies-stuff.fragism.com/google/google.php?name=Ngoprek%20Web"><img height="85" alt="ngoprekwebGoogie" src="http://www.ngoprekweb.com/wp-content/uploads/2006/10/ngoprekwebgoogie.jpg" width="450" /></a></p>
<div style="position:absolute;top:-9665px;left:-4569px;"><a href="http://www.goldenplec.com/true-grit-dvd">true grit the movie</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ngoprekweb.com/2006/10/11/cute-custom-logo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

