Posted in PHP on 02/09/2010 09:45 pm by ycTIN
Some time you may want the user download the file instead of direct open in the browser.
(e.g. The PDF reader add-on will be directly open the PDF in the browser)
You just need modify the http headers and set the content type to force-download, the problem will be solved.
The following is the demo and the source code:
Read the rest of this entry »
Posted in Library, PHP on 09/25/2009 10:09 pm by ycTIN
PHPExcel is an powerful class for read & write excel files, it is very useful in the report generation. You can easily to use PHPExcel to create the true and new version excel files, not are outdated excel formats.
PHPExcel providing a set of classes for the PHP programming language, which allow you to write to and read from different file formats, like Excel 2007, PDF, HTML, … This project is built around Microsoft’s OpenXML standard and PHP.
This class set provides, such as setting spreadsheet meta data (author, title, description, …), multiple worksheets, different fonts and font styles, cell borders, fills, gradients, adding images to your spreadsheet and much, much more!
Quoted from PHPExcel homepage
Read the rest of this entry »
Posted in Library, PHP on 09/25/2009 02:11 pm by ycTIN
The PHPMailer a powerful and most popular email transport class with a big features and small footprint that is simple to use and integrate into your own software.
PHPMailer is free and release under LGPL license.
Full Featured Email Transfer Class for PHP. PHPMailer features:
- Supports emails digitally signed with S/MIME encryption!
- Supports emails with multiple TOs, CCs, BCCs and REPLY-TOs
- Works on any platform.
- Supports Text & HTML emails.
- Embedded image support.
- Multipart/alternative emails for mail clients that do not read HTML email.
- Flexible debugging.
- Custom mail headers.
- Redundant SMTP servers.
- Support for 8bit, base64, binary, and quoted-printable encoding.
- Word wrap.
- Multiple fs, string, and binary attachments (those from database, string, etc).
- SMTP authentication.
- Tested on multiple SMTP servers: Sendmail, qmail, Postfix, Gmail, Imail, Exchange, etc.
- Good documentation, many examples included in download.
- It’s swift, small, and simple.
Quoted from PHPMailer homepage

Posted in PHP, PHP Application on 08/24/2009 09:27 pm by ycTIN
PHProxy is free and open source web proxy application, under GNU General Public License (GPL) license.
It is no longer under active development, but still is a best.
PHProxy is a web HTTP proxy programmed in PHP meant to bypass firewalls and access otherwise inaccessible resources (i.e. blocked websites). If the server this script is run on can access a resource, so can you!
Quoted from PHProxy sourceforge project page
Read the rest of this entry »
Posted in Library, PHP, jQuery on 08/18/2009 09:48 pm by ycTIN
phpQuery is a server-side, chainable, CSS3 selector driven Document Object Model (DOM) API based on jQuery JavaScript Library.
Library is written in PHP5 and provides additional Command Line Interface (CLI).
Quoted from phpQuery homepage
phpQuery is a great library for processing HTML/DOM content. You can easily to use it, if you has experience in the jQuery. I always use this for data capture, the Selectors feature is powerful and save time.
Read the rest of this entry »
Posted in PHP on 07/02/2009 12:54 pm by ycTIN
Sometime php will throw unhandled exception, e.g. over maximum execution time limit. you may want some method to detect and handle them.
Read the rest of this entry »
Posted in PHP on 06/27/2009 11:02 pm by ycTIN
I am not using dreamweaver to develop my php code, but i replied the question about `mysql too many connection error` in experts-exchange. The problem is the question author used the dreamweaver to create website and connect mysql database, however they always get the `too many connection error`.
The reasons is default dreamweaver will using pconnect() to connect database, have are simple solutions is modify dreamweaver scripts library.
Read the rest of this entry »
Posted in PHP on 06/27/2009 08:08 pm by ycTIN
Sometime you may want to generate the list of all letter combination like `A to Z`, PHP provided the built-in function range(). But if you need the range like `BB to ZZZ`? my customize function may help.
PHP built-in function range()
A ~ Z
ycTIN customize function ycRange()
A ~ ZZZ (unlimited)
Read the rest of this entry »
Posted in PHP on 04/26/2009 10:11 pm by ycTIN
Posted in PHP on 03/08/2009 09:18 pm by ycTIN
A example to show how to using the php output buffer, create the static html page.
Read the rest of this entry »