Displaying posts tagged with

“PHP”

Convert ip address from dotted quad notation to integer

Normally we see the IP address of our computers is a dotted quad, such as 192.168.2.1. Frequently, IP address is stored in database as integer to save space and provide high performance. How to convert the IP address from a dotted quad to an integer? Let us understand the algorithm of the conversion. Once we [...]

  • Share/Bookmark

Use public geoip database in your web project

Last week I came across a website http://www.hostip.info. Apparently it is open project that aims to collect geoip information from general public. The owner of the site is generously enough to share his database with the world. Thanks a lot for doing that. I found some sample code in the website contributed from other folks. [...]

  • Share/Bookmark

Remove BOM from utf-8 files

Problem When I developed a PHP web application with multiple language support, I encountered a situation that PHP report “header is already sent”. That was caused by the Unicode Byte Of Mark (BOM) at the beginning of files in utf-8 encoding. Solution 1 In my article Solution for Cannot modify header information in PHP application, one [...]

  • Share/Bookmark

Solution for Cannot modify header information in PHP application

I encountered a strange problem when I developed a PHP website application. When I use english language file, saved in ASCII format. The web application runs smoothly with no problem. As soon as I change the language file to an Asian language, saved in UTF-8 format, a problem occurs. See the following for the detail [...]

  • Share/Bookmark

Brand new user interface of Online Note 2.0

ASP Online NoteTaker 1.0 has been redesigned in PHP language. Now the brand new PHP Online Note 2.0 is alive. This article will introduce the new features of the Online Note 2.0 and provide a simple how-to guide for you. Introduction Figure 1 show the new home page of the Online Note 2.0. The new [...]

  • Share/Bookmark