[PHP] Force download the files

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 »

 

Experts-Exchange 2009 Christmas and New Year Gift

I received the gift from Experts-Exchange before Christmas, share some photos now.

Read the rest of this entry »

 

Popular HTTP response status code in the web development

The popular HTTP response code with simple description:

2xx Success

200 OK

Good status, server return successful

3xx Redirection

301 Moved Permanently

Permanently redirect to new URL, better in the SEO (Recommend)

302 Found

Temporary redirect to new URL(Default)

304 Not Modified

The request resource has not been modified since last requested. Browser will load the content from cached (IE may not)

Read the rest of this entry »

 

Windows Live Writer – Image Upload Not Supported by Weblog (Wordpress)

Yesterday, I update my blog via Windows Live Writer. But get the following error message:

Image Upload Not Supported by Weblog
The following images cannot be published because the weblog does not support image publishing.

…some filenames

It has been working fine, and the Windows Live Writer not any update in this period, I just relocated my blog to another server, so I think the problem should be about this. I found a simple way to solve this problem, after checking the Wordpress configure.

Read the rest of this entry »

 

Find the geography location by IP-address or host name

Sometime you may want to know the following informations:

  • IP address and hostname convertion
  • Tracking and lookup IP address
  • Determine the IP address or host location
  • Find the geographical location of the web sites, identified by the IP address
  • Display the web site geographical location in the map
  • IP Tools with multi-language interface
  • More informations about the hostname, domain and ip address

Demo

Click here to trace my homepage now!!
http://ip.many3.com/en/tracer/yctin.com/

Also have an igoogle gadget : iGoogle Geo IP Tool

Screenshot

igoogle

More Screenshot

Read the rest of this entry »

 

The country lists – Both database and dropdown list version for development

Some time you may need to display the country for your users choose, the following resource may help you saving the time.

Country Name and ISO 3166 Code MySQL Import File

http://27.org/isocountrylist/

Country Lists in Most Popular Languages – HTML Dropdown List

http://urbanoalvarez.es/blog/2008/06/06/country-state-select-lists/

In chinese section should be separate into simplified chinese and traditional chinese, detail please see below…

Read the rest of this entry »

 

Best JavaScript IDE – Aptana Sutdio

The Aptana Studio based on the Eclipse IDE, is a usefully ide for develop the complex web application(e.g. AJAX, B/S Programs). I very like the code completion and the cross browser compatible detection features.

The Aptana is cross-platform, free, and open-source. Provided are differents installation type both standalone and Eclipse plugin, You can download the Aptana plugin to improve your existing Eclipse IDE or new standalone IDE.

Overview

Aptana Studio is a complete web development environment that combines powerful authoring tools for HTML, CSS, and JavaScript, along with thousands of additional plugins created by the community.

Unified Editing for Web Apps

Aptana Studio’s editors provide world-class HTML, CSS, and JavaScript code completion, reference, and validation at your fingertips.

Ajax and JavaScript Libraries

Get unrivaled support for popular libraries including jQuery, Prototype, YUI, dojo, Ext JS, MooTools, and others.

Ruby on Rails, Python and PHP

Add powerful plugins and ready-to-use runtimes for Ruby on Rails, Python and PHP. Eclipse users can easily add Studio as a plugin.

Desktop Ajax

Use your skills to create desktop web applications with our plugin for Adobe AIR.

Free, Open Source and Cross Platform

Download Aptana Studio for Windows, Mac, or Linux. Both the standalone and Eclipse plugin distributions are free, open source software.

Yeah, it’s in there.

Multi-browser previews, SQL database tools, an awesome JavaScript debugger, server tail views, and tons more.

Quoted from Aptana homepage

Read the rest of this entry »

 

The difference between utf8_general_ci and utf8_unicode_ci in MySQL

The utf8_general_ci and utf8_unicode_ci are most popular collations for utf8 charset in MySQL database. But a lot of peoples do not know the different between utf8_general_ci and utf8_unicode_ci.
Read the rest of this entry »

 

[PHP] PHPExcel – The Powerful Excel Library

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 »

 

[PHP] PHPMailer – The Mail Library

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

Read the rest of this entry »