Monday, December 31
Zend Framework for Nice and Clean PHP Programming
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
'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
- Posts – number of times a widget was posted
- Wildfire loads – the number of times the Quick Posting interface was loaded.
- Posts / loads – the ratio between the Quick Posting interface loads and number of posts.
- 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.
- 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.
- 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
Eventum: Bug Tracking System
System Requirements
- PHP 4.1.0 or newer versions
- PCRE Extension (usually enabled by default with newer PHP versions)
- Session Extension (usually enabled by default with newer PHP versions)
- MySQL Extension (built-in support with most PHP distributions)
- GD Extension
- MySQL Database Server
- 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
- Email Integration
- SCM Integration
- Project Management
- Issue Listing
- Reporting Issues
- 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
- Mini Web
What's my IP address, ISP, country, proxy
CustomRSS
Official Google Mini Search Gadget - Today in History
- Free Sudoku Puzzles
- Babelfish
US Traffic Information - Free Text Message
Bush Quote Generator - Beauty Tip of the Day
- Search Answers.com
- 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
- Start with new database and save it.
- MS Access will open a window showing the table creation window.
- Right click anywhere in the table creation window and choose link tables
- Check out the Files of type and select ODBC databases
- Switch to Machine Data Source (if you're familliar with ODBC connection setting, you should have no problem with the setup)
- Select the data source and click OK.
- Enter login credential
- Select your desired tables (you also allowed to select multiple tables)
- Done.
Friday, November 9
Monday, October 22
Avoid SQL Injection with cfqueryparam
--
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.
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:
http://myserver/page.cfm?Emp
The result is that ColdFusion tries to execute the following query:
SELECT * FROM Employee
WHERE Emp_ID = 7 DELETE 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.
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
WHERE Emp_ID =
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'.
The following table lists the available SQL types against which you can evaluate the value attribute of the cfqueryparam tag:
BIGINT | BIT | CHAR | DATE |
DECIMAL | DOUBLE | FLOAT | IDSTAMP |
INTEGER | LONGVARCHAR | MONEY | MONEY4 |
NUMERIC | REAL | REFCURSOR | SMALLINT |
TIME | TIMESTAMP | TINYINT | VARCHAR |
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
Features:
- New interface
- Simple galleries
- Lightbox view
- Languages
- Permanent URLs
- Automatic thumbnails
- Added viewing features
- Private galleries
- 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
Currently 289800028 site thumbnails served and counting. You also be able to display the images of previewed website as del.icio.us does.
Display data as Gmail does
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">
<tr>
<td style="overflow: hidden; empty-cells: show; white-space: nowrap;">
Write something longerr here
</td>
</tr>
</table>
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
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
- 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
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
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
Knowledge gained:
- Display photos (including the private photos)
- allow photo to be commented
- Display photo not in set
- Display photo set
- Upload photo to Flickr
Tuesday, August 28
Using 12CropImage 2
Tuesday, August 21
Ajax Spell Checker
Wednesday, August 8
Create phpSiteMap and send it to gooooogle
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
SESSION OR COOKIES LOST WHEN HEADER REDIRECT LOST [SOLVED]
session.cookie_path = /
Friday, July 13
Call to undefined function: html_entity_decode
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
unset($trans_tbl["""]);
}
return 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
- 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:
extension=php_mssql.dll - 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.
- 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:telnet1433If 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
- Learn what is FlashVars
- Add this code to your html when adding Flash object
- Open Flash file (*.fla)
- Example use of query-string
- catID was appended on the URL string
codebase=""http://macromedia.com/cabs/swflash.cab#version=6,0,0,0""
WIDTH="250" HEIGHT="250" id="flaMovie1" ALIGN="CENTER">
FlashVars VALUE="imageFilename=images%2Fimage1%2Ejpg">
FlashVars="imageFilename=images%2Fimage1%2Ejpg"
quality="high" bgcolor="#FFFFFF" WIDTH="250" HEIGHT="250"
NAME="flaMovie1" ALIGN TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
on (press)
{
getURL("page.php?catID="+_root.catID+"&state=KELANTAN&subcatID="+_root.subcatID);
}
Using Swift Mailer for Effective PHP mailing
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)
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
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.