ZF has just released its newest version today, version 1.0.0. This is the first major release and the stable one. So now, it is safe to say that ZF is the first and the best class library available for PHP5 web application development.
Congratulations to ZF developer team, and congratulations to us all, PHP developers around the world.
As Bill Karwin, ZF product manager, said, “please click C:\Windows\Media\tada.wav now”.
Link: Download ZF 1.0.0
Eris Ristemena PHP, Zend
Why are people still using PHP4 again?
Oh yes, the compatibility issue. Ok, since i’m rewriting all my web apps using Zend Framework now, i guess I don’t have much choice except to switch my PHP installed on my server to PHP5 (Zend Framework was written in PHP5).
Why would i use Zend Framework? two words: beautiful and simple. ZF knows very well how to use the power which comes with PHP5. OOP and design pattern are well written all over the place. Having a quick look at Zend_Controller will explain why i say this.
About the simplicity, Aaron Warmus put it well when he said this,
When evaluating the code within Zend Framework, it was clear that the concept of “Extreme Simplicty†meant that when faced with design decisions, Zend Framework always went with using the power which is built into PHP5 …
In a couple words, extreme simplicity means not reimplementing functionality already available in PHP5.
ZF now in days away from its stable version (currently in 1.0.0-RC2). As many other people out there, i hope ZF will be the rescuer of PHP5 slow adoption. In broad, i hope it will make alot easier for us to build a profesional yet reliable web apps using PHP.
Anyway, i’m switching my server now, wish me luck.
Eris Ristemena PHP, Zend
After being delayed for couple days, due to some problem with Pearson Vue database, i finally took my Zend PHP Certification exam last tuesday.
What? are you kidding me, off course i passed the exam.
So now i’m officially Zend certified engineer.

Thanks to Brainmatics for such a good effort preparing my test.
Now, there are three Zend certified engineers from Indonesia. Rock on, dude!
Eris Ristemena PHP, Zend
Couple days ago, i was asked by a friend to make a small currency exchange script in PHP. With slow internet connection and so short amount of time, the best thing i could think of was grabbing the number from available currency rate site like this. With curl and PCRE function, i finished the script in no time. :p
That’s evil of course.
So, i create the following script as my apology. I use FoxRate currency converter API. Be careful though, you can not run the script too fast, wait for awhile before sending the next request. That’s what happen when you use a free web service. I guess.
Anyway, it’s 2 a.m in the morning here. Gotto go to bed. Night night.
function convertcurrency($from,$to,$amount)
{
$xml = "
<?xml version='1.0'?>
<methodcall>
<methodname>foxrate.currencyConvert</methodname>
<params>
<param>
<value>
<string>$from</string>
</value>
</param>
<param>
<value>
<string>$to</string>
</value>
</param>
<param>
<value>
<double>$amount</double>
</value>
</param>
</params>
</methodcall>";
$url = "http://www.foxrate.org";
$header = "POST /rpc/ HTTP/1.0 \\r\\n";
$header .= "Host: foxrate.org \\r\\n";
$header .= "MIME-Version: 1.0 \\r\\n";
$header .= "Content-length: ".strlen($xml)." \\r\\n";
$header .= "Content-transfer-encoding: text \\r\\n";
$header .= "Document-type: Request \\r\\n";
$header .= "Connection: close \\r\\n\\r\\n";
$header .= $xml;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$xmlresponse = curl_exec($ch);
curl_close($ch);
$sxml = new SimpleXMLElement($xmlresponse);
$xxml = $sxml->xpath("params/param/value/struct/member");
foreach ( $xxml as $v )
{
if ( $v->name == "flerror" )
{
$errflag = $v->value->int;
}
if ( !$errflag )
{
return false;
break;
}
if ( $v->name == "amount" )
{
return $v->value->double;
}
}
}
Sample usage:
$ret = convertcurrency("JPY","IDR",1);
if ( $ret )
{
echo "1 JPY = $ret IDR";
}
else
{
echo "Wrong currency code or you're too fast to fetch, wait for awhile.";
}
Eris Ristemena PHP
This is interesting,
Java 6 provides the Common Scripting Language Framework for integrating various Scripting Languages into the Java Platform. Most of the popular Scripting Languages like Java Script, PHP Script, Bean Shell Script and PNuts Script etc., can be seamlessly integrated with the Java Platform. Support for Intercommunication between Scripting Languages and Java Programs is possible now because of this. It means that Scripting Language Code can access the Set of Java Libraries and Java Programs can directly embed Scripting Code. Java Applications can also have options for Compiling and Executing Scripts which will lead to good performance, provided the Scripting Engine supports this feature. Let us have a high-level overview of this JSR before going in detail.
Eris Ristemena Java, Javascript, PHP

If you like to follow everything using your feed reader, you might also want to read your Apache log in feed. Well, you need to try Apache Log Analyzer 2 Feed.
ApacheLogAnalyzer2Feed is an object oriented class, written in PHP 5, for parsing/filtering an Apache log file and convert it into feed.
You can filter out which part of your Apache log you’d like to see. For example, you can generate a feed that shows you when Google Bot visit your blog or when your visitor register, etc. See some sample codes here.
Here’s the sample output from my Apache log,
<rss>
<channel>
<title>Log /usr/local/apache2/logs/access_logs filtered by 1 filters</title>
<description>Array
(
[0] => Array
(
[0] => Request
[1] => regexp:generator\.php
[2] => IS
)
)
</description>
<link>/log.php</link>
<lastbuilddate>Wed, 06 Jun 2007 21:20:08 +0100</lastbuilddate>
<generator>FeedCreator 1.7.2-ppt (info@mypapit.net)</generator>
<item>
<title>192.168.1.99 - GET /generator.php HTTP/1.0</title>
<link>/log.php</link>
<description>Array
(
[Remote-Host] => 192.168.1.99
[Remote-Logname] => -
[Remote-User] => -
[Time] => [06/Jun/2007:21:17:26 +0700]
[Request] => GET /generator.php HTTP/1.0
[Final-Status] => 200
[Bytes-Sent] => 9274
[Referer] => -
[User-Agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
)
</description>
<pubdate>Wed, 06 Jun 2007 21:17:26 +0100</pubdate>
<guid>b27435fba04c82a72e084d0404bc442b</guid>
</item>
<item>
<title>192.168.1.99 - GET /generator.php HTTP/1.0</title>
<link>/log.php</link>
<description>Array
(
[Remote-Host] => 192.168.1.99
[Remote-Logname] => -
[Remote-User] => -
[Time] => [06/Jun/2007:21:20:02 +0700]
[Request] => GET /generator.php HTTP/1.0
[Final-Status] => 200
[Bytes-Sent] => 9274
[Referer] => -
[User-Agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
)
</description>
<pubdate>Wed, 06 Jun 2007 21:20:02 +0100</pubdate>
<guid>005091851cf9b076180c57ff3c5ea081</guid>
</item>
</channel>
</rss>
Eris Ristemena PHP

PHP Abstract is Zend Developer Zone’s new podcast for PHP developers. It was announced on may 17th 2007, but the first episode was just online today.
PHP Abstract episode 1 talks about PHP security tips by Eli, the author of PHP 5 in Practice. It is a short duration talks, but pretty useful.
Link:
PHP Abstract Feed
Eris Ristemena PHP, Zend
Yeah, the first version of PHP4 (PHP 4.0.0) released today, seven years ago.
Who cares about this? Well, Sara did.
Eris Ristemena PHP