Monday, December 31

Zend Framework for Nice and Clean PHP Programming

Before this I use swift mailer as frame work for sending mail using php. I really love swift mailer in terms of stability and the code. Today I found Zend Framework which does more jobs than swift mailer. Not only it capable to send email securely but it provide us the API for GData, Flickr,, Amazon, etc. Other than these, it also handles various common tasks. This is new level of programming to me.

I really hope that zend framework would be able to get data from facebook and Microsoft Exchange. It really mean to me. If any of you know how to link php with Microsoft Exchange data, please welcome to give the tutorial, or link.

Thursday, December 27

SWF Chart

I have experienced on populate data on chart by using swiff chart; Globfx product with PHP and coldfusion. But swiff chart is pricey. Today I found Open flash Chart.

Open Flash Chart, is open source. It is free to use. Why is it free? here is the excerpt from the website:
'Once upon a time I had to deal with a company who sell flash charting
components, their component had a bug that I needed fixing, so I emailed them
about it asking when it'd be fixed. (Remember that I had paid real money for
this software.) They were so incompetent, rude and obnoxious that after three or
four weeks of emails I thought to myself "I could learn Flash and Actionscript
and write my own charting component, release it as Open Source, host it on
sourceforge and build up a community of helpful coders faster than they can fix
a single bug." And that is what I did. And that is why it is free. I guess the
moral of the lesson is: don't piss off your customers.'

Gigya: the widget distribution network

This is simplest form of social widget which forms of multi social network like myspace, friendster, blogger, pageflakes, orkut, tagged, hi5, Facebook, Livespace, Wordpress, Typepad, iGoogle and many more.

Gigya provides its partners with the Wildfire tools. Each of these tools may substantially increase your viral distribution. The Wildfire tools are easy to integrate within any webpage, fully customizable and are free to use.

The widget can be customize through HTML or actionscript. You also be able to change background image, height, width, etc. The best thing about gigya is there are reports for this widget that you can use for analysis. Here is the list of type of report after you embed gigya onto your website

  1. Posts – number of times a widget was posted

  2. Wildfire loads – the number of times the Quick Posting interface was loaded.

  3. Posts / loads – the ratio between the Quick Posting interface loads and number of posts.

  4. Impressions in profile – the number of times your widgets were viewed on the pages they were posted on. Note: Facebook does not allow for measuring impressions of widgets on the user profile.

  5. Stickiness – the ratio between daily profile impressions and daily posts. Higher numbers suggest widgets stays longer on page.Please note that this measure becomes relevant only after a while.

  6. Posts by Social Network – The number of posts per social network for the entire chosen date rate.

Wednesday, December 26

Wink: Tutorial and Presentation creation software

Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and generate a highly effective tutorial for your users.

Eventum: Bug Tracking System

Eventum is a user-friendly and flexible issue tracking system that can be used by a support department to track incoming technical support requests, or by a software development team to quickly organize tasks and bugs. Eventum is used by the MySQL AB Technical Support team, and has allowed us to dramatically improve our response times.

System Requirements

  1. PHP 4.1.0 or newer versions
  2. PCRE Extension (usually enabled by default with newer PHP versions)
  3. Session Extension (usually enabled by default with newer PHP versions)
  4. MySQL Extension (built-in support with most PHP distributions)
  5. GD Extension
  6. MySQL Database Server
  7. Email Integration - The email integration module requires PHP's IMAP extension and also a POP3/IMAP server that allows connections to their appropriate ports.

Feature List

  1. Email Integration
  2. SCM Integration
  3. Project Management
  4. Issue Listing
  5. Reporting Issues
  6. Command Line Interface

Tuesday, December 4

Gadgets for quick web development

Web Gadgets are something what most new developer loves to seek. And there are a lot of such services offered on the web. Google centralized and hubs a lot of gadgets (currently is 27790). These gadgets will help to increase the interactivity of website and add up some usefulness. But most of this gadgets are focused for quick personal web development. It seems google is another service of facebook, which host a lot of application to be used by facebook user. But google wants more developer to develop gadgets and host it with google. Developer will find games, communication, SMS service, Stock updates and more

Here is a list some of available gadgets that I found useful

  1. Mini Web
    What's my IP address, ISP, country, proxy


    Official Google Mini Search Gadget
  2. Today in History
  3. Free Sudoku Puzzles
  4. Babelfish
    US Traffic Information
  5. Free Text Message
    Bush Quote Generator
  6. Beauty Tip of the Day
  7. Search
  8. UPS Package Tracking

For Blogger user, just copy the javascript given, and paste it in the element you want.

Friday, November 16

How to link Oracle's tables with Microsoft Access

  1. Start with new database and save it.
  2. MS Access will open a window showing the table creation window.
  3. Right click anywhere in the table creation window and choose link tables
  4. Check out the Files of type and select ODBC databases
  5. Switch to Machine Data Source (if you're familliar with ODBC connection setting, you should have no problem with the setup)
  6. Select the data source and click OK.
  7. Enter login credential
  8. Select your desired tables (you also allowed to select multiple tables)
  9. Done.

Friday, November 9

Google Sitelinks

I have created sitelinks for and today it appear as I want it to be (see pic).

Monday, October 22

Avoid SQL Injection with cfqueryparam

After tourism malaysia website defaced a few days ago, the awareness of security of all our websites rised as this happened. To prevent this from happening again, here is the full article.


Some DBMSs let you send multiple SQL statements in a single query. However, hackers might try to modify URL or form variables in a dynamic query by appending malicious SQL statements to existing parameters. Be aware that there are potential security risks when you pass parameters in a query string. This can happen in many development environments, including ColdFusion, ASP, and CGI. Using the cfqueryparam can reduce this risk.

About query string parameters

When you let a query string pass a parameter, ensure that only the expected information is passed. The following ColdFusion query contains a WHERE clause, which selects only database entries that match the last name specified in the LastName field of a form:

SELECT FirstName, LastName, Salary

FROM Employee

WHERE LastName='#Form.LastName#'

Someone could call this page with the following malicious URL:


The result is that ColdFusion tries to execute the following query:

SELECT * FROM Employee


In addition to an expected integer for the Emp_ID column, this query also passes malicious string code in the form of a SQL statement. If this query successfully executes, it deletes all rows from the Employee table--something you definitely do not want to enable by this method. To prevent such actions, you must evaluate the contents of query string parameters.

Using cfqueryparam

You can use the cfqueryparam tag to evaluate query string parameters and pass a ColdFusion variable within a SQL statement. This tag evaluates variable values before they reach the database. You specify the data type of the corresponding database column in the cfsqltype attribute of the cfqueryparam tag. In the following example, because the Emp_ID column in the cfdocexamples data source is an integer, you specify a cfsqltype of cf_sql_integer:

SELECT * FROM Employee


cfsqltype = "cf_sql_integer">

The cfqueryparam tag checks that the value of Emp_ID is an integer data type. If anything else in the query string is not an integer, such as a SQL statement to delete a table, the cfquery tag does not execute. Instead, the cfqueryparam tag returns the following error message:

Invalid data '7 DELETE FROM Employee' for CFSQLTYPE 'CF_SQL_INTEGER'.

Using cfqueryparam with strings

When passing a variable that contains a string to a query, specify a cfsqltype value of cf_sql_char, and specify the maxLength attribute, as in the following example:

SELECT * FROM employees

WHERE LastName =

cfsqltype = "cf_sql_char" maxLength = "17">

In this case, cfqueryparam performs the following checks:

· It ensures that LastName contains a string.

· It ensures that the string is 17 characters or less.

· It escapes the string with single-quotation marks so that it appears as a single value to the database. Even if a hacker passes a bad URL, it appears as follows:

WHERE LastName = 'Smith DELETE FROM MyCustomerTable'.

Using cfSqlType

The following table lists the available SQL types against which you can evaluate the value attribute of the cfqueryparam tag:





















Note: Specifying the cfsqltype attribute causes the DBMS to use bind variables, which can greatly enhance performance.

Saturday, October 20

Minishowcase: The PHP Photo Gallery

minishowcase is a small and simple php/javascript online photo gallery, powered by AJAX that allows you to easily show your images online, without complex databases or coding, allowing to have an up-and-running gallery in a few minutes. Here the demo

  1. New interface
  2. Simple galleries
  3. Lightbox view
  4. Languages
  5. Permanent URLs
  6. Automatic thumbnails
  7. Added viewing features
  8. Private galleries
  9. Plug-in interface
at least php v4.2.0
GD or GD2 extension
FTP account and client.
browser must be JavaScript Enabled
minishowcase is licensed under a Creative Commons Attribution-Share Alike 2.5 License. And was released on Sep. 29, 2007. There's also explanation for configure the theme and intergrate the gallery with another application.

Note: This gallery is not compatible with IE 5.x Mac

Wednesday, October 17

WebSnapr for preview website

WebSnapr lets you capture screenshots/thumbnails of almost any web page. Let your visitors to instantly visualize any web page before clicking. WebSnapr also provides us the WebSnapr Preview Bubble which is a simple, unobtrusive script used to display an overlay bubble showing a hyperlink target thumbnail using WebSnapr. It’s a snap to setup which can increase site traffic, click-through rate and site stickiness.

Currently 289800028 site thumbnails served and counting. You also be able to display the images of previewed website as does.

Display data as Gmail does

gmail-like table

I was referring to this site for getting output as gmail does. It's not too difficult to do that. But I used table to organize the layout. Check the in-line style attach to the tag below

<table style="table-layout: fixed;" width="300">
<td style="overflow: hidden; empty-cells: show; white-space: nowrap;">
Write something longerr here

The code above will restrict the table from expand if you have longer text or image in a '<td style="overflow: hidden; empty-cells: show; white-space: nowrap;">'...

Thursday, October 11

phpESP for Administrate survey processing

phpESP is a set of PHP scripts to let non-technical users create surveys, administer surveys, gather results, and view statistics, all managed online after database initialization.

But I found it's was uneasy for me to install and configure. This software require the application to be run on apache (recommended) but I dare to put it on IIS. Beside, it also need gettext to be install together with your PHP.

However it is listed as the 50 best open source for business even I found it still unstable.

Thursday, October 4

Exploring PHPMyVisites

This is an open-source software for website statistics and audience measurements. I'm currently testing and haven't fully test it. I like the way it lead user to automated installation with simple step-by-step guidance. This software is similar to online web analytics; google analytics. Here is the list of features
  • A clean and user-friendly interface to present data and to aid in data analysis.
  • Clear and concise graphics presenting important information in an easy-to-understand format.
  • Free: phpMyVisites is completely free.
  • Precise visitor statistics over a period of time (day/week/month/year).
  • Visitor Frequency: new visitors, regular (known) visitors, and how often visitors view the web site.
  • Management of web site statistics and all file types (PDF, Image, etc.).
  • Web site page classification available (by groups, by subgroups, etc.).
  • Visitor Analysis: Statistics for pages where visitors leave the web site and for pages where the visitors enter the web site.
  • Geographical Statistics: Classification by continent/country (interactive world map).
  • Technical Configuration Statistics: Web browsers, resolution, managed plug-in, etc.).
  • Complete and clear statistics about web site discovery: How do visitors come to the web site?
  • Live Clearly Defined Web Site Discovery Tools: Search Engines, Web Sites, Partner Sites, Newsletters and Direct Access
  • Able to detect more than 300 internationally-used search engines and keyword associations.
  • Define web sites as partners and add an unlimited number of newsletters.
  • One software installation and track all your website
  • Receive web site statistics everyday by e-mail, by RSS feed, etc.
  • And much more..

Wednesday, September 26

MD5 equal to hash function in ColdFusion

I have an application and it requires login to enter the application. Due to all the passwords were hash in coldfusion, I can't see how to read/compare a password sent in php to match with the database value.

Luckily, MD5 of PHP can cater this job. MD5 also hash the password and the value is the same as coldfusion's hash.

Monday, September 24

PHP DIRECTOR - Your Open Source Video Gallery

I stumbled upon this open source video gallery while looking for php video upload script. But can't find one and found this. If you plan to start your own youtube, you may want to try this.

PHP Director does not allow user to upload video, but it lets user to paste the URL of video clips from youtube. After submit the video to PHP Director, the application will retrieve all the thumbnail available from youtube. And user can start to name it and give some description of the video.

Thursday, September 6

Exploring CFlickr

CFlickr does not involve intensive XML as I still have much to ponder on it. I have experimented the example shown and manipulate it the way I want it with coldfusion.

Knowledge gained:
  1. Display photos (including the private photos)
  2. allow photo to be commented
  3. Display photo not in set
  4. Display photo set
  5. Upload photo to Flickr

Tuesday, August 28

Using 12CropImage 2

It's a sigh for me to have this tool because no more support provided for this plugin since December of 2006. This plugin supports for image upload, resize as well as crop. No big issue during the installation of this plugin. But still manage to tweak to suit to my concept and theme.

Tuesday, August 21

Ajax Spell Checker

Currently am using spellingcow to check spelling error on any html textarea in a page. Prior to this, I've used ajax-spell checker to kick out all the spelling cow ads. But spellingcow still great at this time because it only require developer to add only one line code. But I still can't figure out how to enable spelling cow works on text input. So am still struggling to digg out the code of ajax-spell to make it works on my application

Wednesday, August 8

Create phpSiteMap and send it to gooooogle

After publish several websites, I need something that can automate the creation of sitemap.

phpSitemapNG let you create sitemap files in different formats as e.g. the xml-based Google Sitemaps format, RSS, txt or html-based. It will spider your website and also your filesystem (of course, as you prefer). You can download and use it for free, the licence is GPL.

This tool will crawl the specified directory and later will tell google to read the sitemap to genarate sitelink on google search result

Thursday, July 26


After three days of headache, finally I found what php.ini setting to need to be change. You must set
session.cookie_path = /

Friday, July 13

Call to undefined function: html_entity_decode

If you are using php version below than 4.3, html_entity_decode it's not available for this version. Then you should employ this lines of codes to make it works

function html_entity_decode ($string, $opt = ENT_COMPAT) {

$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);

if (
$opt & 1) { // Translating single quotes

// Add single quote to translation table;
// doesn't appear to be there by default
$trans_tbl["'"] = "'";

if (!(
$opt & 2)) { // Not translating double quotes

// Remove double quote from translation table

strtr ($string, $trans_tbl);

// Just to be safe ;o)
if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2);
if (!
defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0);
if (!
defined("ENT_QUOTES")) define("ENT_QUOTES", 3);

This will saves your time

Call to undefined function: mssql_connect() on IIS

I check my php.ini setting but the mssql function doesn't appear. So follow this step to make it working
  1. Edit your php.ini file and uncomment (remove the semicolon from) the following line of code. If this line is missing in your php.ini, you must manually add it in:

  2. The php_mssql.dll file can be obtained in the PHP downloads for Win32. You must make sure that you place the dll in both the /extensions and /WINNT/system32 folder.

  3. Restart the Web server.

But I still can't make my application sucessfully connect to MSSQL 7.0. I configured SQL Server Client Network Utility and enable the TCP/IP.

And I test

Test SQL Server's connections: You can verify that SQL Server is accepting
connections using telnet. In a command window, type the following:telnet 1433If you get an error message such as "Could not open a connection to host on port 1433: Connect Failed…" then you should open the SQL Server Enterprise Manager and check the server and port setting. This problem can also be caused by a firewall or if the SQL Server service has been stopped unexpectedly. If you get a blank screen, it means that SQL Server is accepting incoming connections.

Ok...I get the blank screen and that's mean the connection is ready on port 1433

Monday, July 9

How to pass URL Parameter to Flash

  1. Learn what is FlashVars

  2. Add this code to your html when adding Flash object
  3. codebase="",0,0,0""
    WIDTH="250" HEIGHT="250" id="flaMovie1" ALIGN="CENTER">

    FlashVars VALUE="imageFilename=images%2Fimage1%2Ejpg">

    quality="high" bgcolor="#FFFFFF" WIDTH="250" HEIGHT="250"
    NAME="flaMovie1" ALIGN TYPE="application/x-shockwave-flash"
  4. Open Flash file (*.fla)

  5. Example use of query-string

  6. on (press)

  7. catID was appended on the URL string

Using Swift Mailer for Effective PHP mailing

Many newbie in PHP programming when starting to send email from php using php native email function may find it hard to configure to send a simple email. But I have found another way by using classes from swift mailer. Luckily it's free.

It has all the basic function including attachment, send batch email, send mass email, HTML email, and HTML/plain email. Yet, I haven't fully explored all the other features.

Another interesting is, Swift mailer handle basic email checking. That means, when you send out using batch send, it can check every email address provided and you'll be able to list those email.

Swift supports event-driven plugins which offer you the opportunity to really take control of the library and set this mailer apart from everything else that's out there. Over time, and from previous versions, the library has been steadily refactored and is now usable for more than just the blind sending of emails. It can compose RFC 2822 compliant messages for use elsewhere too. I'm looking at offering the reverse and parsing real emails into the message object format used in the library.
This one is another features I haven't yet explored and maximise the potential of this classes. I'm hoping if someone out there could share with me what can be done and achieve this Swift Mailer

Tuesday, July 3

ERROR 1005 (HY000): Can't create table (errno: 13)

I can't alter table (eg: add table, edit field attributes) in mysql as it produce error

ERROR 1005 (HY000): Can't create table (errno: 13).

The solution is to change the chmod of the folder in /var/lib/mysql/foldername

Wednesday, May 2

Convert Your Fav YouTube to common video file format

video file format to be chosenStart convert your favourite video at YouTube now! Just copy your fav video URL and paste at and select your preferred video file format.When you submit an url, it will download and convert to the video format. Then you can download the converted file.

Tuesday, March 20

Sync your data by using Apollo

Using technologies like Apollo, rich internet application designers can bridge
the one shortcoming of online apps — what to do when the internet isn't
available? Need to edit a document mid-flight? Want to post your photos from the
subway? Currently, you’re out of luck. But with Apollo-based apps, you could
perform your edits offline and sync your data the next time you connect.
Today's web application like google's Docs & Spreadsheet, ZOHO and flickr require consistent internet connection. But with Apollo, you can finish your work with the web-application on/off line. Apollo stil in its infancy and aim at Flex developer. Apollo has two separate component, SDK for programmer and a runtime software for user to run it on Windows or MAC. You also can experience this with adobe's upcoming Creative Suite 3.

Watch this video to understand about Apollo