Wednesday, September 16, 2009

BasicView Papervision3D in Flex

Tried a simple example in Flex using Papervision3D

View  Demo

Friday, September 4, 2009

Twitter with PHP

Now Tweeting with PHP is made easier by PEAR..
Will write a detailed post about PEAR library later, but for now I will just show you a simple example of writing a tweet to Twitter using PHP PEAR library.
You need to install the following PEAR libraries for the following code to work.
 pear install Net_URL2-0.2.0 
 pear install HTTP_Request2-0.4.0
pear install Services_Twitter-0.3.0
Here is the sample code in PHP for using twitter service...
require_once 'Services/Twitter.php';
$username = 'xxxxxxx';
$password = 'xxxxxxx';

try {
    $twitter = new Services_Twitter($username, $password);
    $msg = $twitter->statuses->update("I'm coding with PEAR right now!");
} catch (Services_Twitter_Exception $e) {
    echo $e->getMessage();