Archive for the 'PHP' Category

19th Jan 2008

Sun acquired MySQL for $1 billion

Sun Microsystems, Inc. (NASDAQ: JAVA) today announced it has entered into a definitive agreement to acquire MySQL AB, an open source icon and developer of one of the world’s fastest growing open source databases for approximately $1 billion in total consideration. The acquisition accelerates Sun’s position in enterprise IT to now include the $15 billion database market. Today’s announcement reaffirms Sun’s position as the leading provider of platforms for the Web economy and its role as the largest commercial open source contributor.

MySQL’s open source database is the “M” in LAMP - the software platform comprised of Linux, Apache, MySQL and PHP/Perl often viewed as the foundation of the Internet. Sun is committed to enhancing and optimizing the LAMP stack on GNU/Linux and Microsoft Windows along with OpenSolaris and MAC OS X. The database from MySQL, OpenSolaris and GlassFish, together with Sun’s Java platform and NetBeans communities, will create a powerful Web application platform across a wide range of customers shifting their applications to the Web.

Source: Sun to Acquire MySQL

Technorati Tags: , , , , , ,

Posted in News, PHP | 1 Comment »

02nd Dec 2007

Horoscope Mambot (Plugin) for Joomla!

Horoscope Mambot (Plugin) for Joomla!

Description

Display a daily/monthly horoscope for a specified star sign. It accepts an RSS feed URL as a parameter, gets star sign value from within your page content, appends the star sign value to the RSS feed URL, fetches the content of the feed, and changes your page content dynamically upon loading. You can have as many horoscope mambot as you like in a page.

Usage

Put {horoscope}YOUR SIGN{/horoscope} in the content area of your page

Feed URLs

  • http://www.shokk.com/cgi-bin/astrology_rss.pl?tid=
  • http://www.astrocenter.com/us/Feeds/RSS/getDaily.aspx?sign=

Demo

Horoscope Mambot (Plugin) for Joomla!

Download

Horoscope Mambot (Plugin) for Joomla! 24kb

This is my very first mambot/plugin and I welcome any comment and suggestion that you may have.

Technorati Tags: , , , , ,

Posted in PHP | No Comments »

22nd Sep 2007

Quick facts about PHP

White Paper
PHP Leads Web 2.0
A Closer Look at the Hidden Drivers and Enablers of the Second Internet Revolution

Technorati Tags: , , ,

Posted in PHP | No Comments »

19th Sep 2007

Export into excel with formula in PHP

In PHP, exporting data into an excel file (.csv) can be achieved very easily by sending a raw HTTP header. And having a formula in cells is no brainier either (and I only found that out after searching through google and not finding any solution - hehe).

The following is a rough example of how you do it. What I am trying to do here as an example is have an excel formula in Age column to calculate the person’s age automatically.

        header('Content-Type: application/csv');
        header('Content-Disposition: inline; filename="report.csv"');  

        // print column titles
        echo 'Name,Year born,Age' . "n";  

        // a full numeric representation of a year, 4 digits; eg: 2007
        $year = date('Y'); 

        // $count starts from 2 because the first row is reserved for column titles
        $count = 2;  

	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 	    echo $row['name'] . ',';
            echo $row['year'] . ',';
            // formula = Current year - Bx(Year born)  B is the column position
            echo '=' . $year . '-B' . $count;
            echo "\n";
            // increment $count by 1 (same as $count = $count + 1)
            $count++;
        }
        exit;

Technorati Tags: , , ,

Posted in Snippets, PHP | No Comments »

02nd Sep 2007

Book: Professional Web APIs with PHP

Book: Professional Web APIs with PHPI have finished reading Professional Web APIs with PHP: eBay, Google, Paypal, Amazon, FedEx plus Web Feeds book by Paul Reinheimer over the weekend.

I have to say, it was quite a resourceful read. I have read a few books on API but I found this book particularly interesting because the book was intended for PHP developers. Apart from offering numerous code examples on how to utilise feeds and APIs provided by leading web brands such as Google and eBay, this book also tells you how to implement your own API and things to look out for when making your API available on the Internet. And the best bit? I have finally understood the difference between REST and SOAP. :)

For those interested, the table of content:

Acknowledgments.
Introduction.
Part One: Web Feeds.
Chapter 1: Introducing Web Services.
Chapter 2: Introducing Web Feeds.
Chapter 3: Consuming Web Feeds.
Chapter 4: Producing Web Feeds.
Part Two: APIs.
Chapter 5: Introduction to Web APIs.
Chapter 6: Interacting with the Google API.
Chapter 7: Interacting with the Amazon API.
Chapter 8: Interacting with the FedEx API.
Chapter 9: Interacting with the eBay API.
Chapter 10: Interacting with the PayPal API.
Chapter 11: Other Major APIs.
Chapter 12: Producing Web APIs.
Appendix A: Supporting Functions.
Appendix B: Complete Feed Specifications.
Appendix C: Development System.
Index.

Technorati Tags: , , , , , , ,

Posted in PHP | No Comments »