26025HTTP compression with mod_gzip and mod_deflatehttp://www.phpfive.net/article19.htmAs is the case with data compression in general the greatest savings to are to be made when the formats to be compressed are of a textual nature. Whilst ASCII or HTML files can be easily compressed using gzip by 75% or more, already optimized files formats such as JPEG's, executable or archive files tend not to compress as well if at all.PHP > Tips and Tutorials > DevelopmentOct 15, 2006Gregory Boshoff
Basic Rules
French Characters in String Literals - UTF-8 Encoding
French Characters in String Literals - ISO-8859-1 Encoding
Chinese Characters in String Literals - UTF-8 Encoding
Chinese Characters in String Literals - GB2312 Encoding
Characters of Multiple Languages in String Literals
When you do web projects for some time, an interesting pattern is likely to emerge. Tho every project has some specific features, many projects share some functionality. I had been programming customer-specific mini-web-CMS' for several months when copy-pasting and integrating all the same editable page, poll and scrolling test code for who knows how many times started to become a real pain.
I found an answer in isoliating pieces of functionality in libraries of functions, then stitching them together by including the library files. However after coupla projects I started to get problems with function names - they started to become real long and avoiding conflicts became a chore. Solution was to implement those pieces as classes. As the code was about showing some user inderface components, I called the classes "widgets". The result was very positive. Writing the widget code would now take maybe %30 more time but time gain during integration was tremendous.
Another unexpected advantage showed itself. I'm using Macromedia Dreamweaver MX for writing PHP code; I find it very useful, however it is unable to present PHP code in meaningful form. In "design" view, all the code between markup would be represented by a PHP icon. Being so it would now and again result in a real nightmare for the company designer and for me. Collecting all the relevant code under one widget class gave me a possibility of presenting user interface element as a separate item that could be manipulated easily in WYSIWYG mode.
The Develop rock-solid code in PHP series is about solving practical real-life problems in medium- to large-scale applications. With a sharp focus on new features available in PHP 4, the articles shed light on numerous tips and tricks that make life easier. Inside, you will find plenty of examples and techniques to learn, with lots of sample code. In this first article, PHP veteran Amol Hatwar gives a higher perspective for designing and writing bug-free, maintainable code for medium- to large-scale Web applications.
Geo-targeting is commonly used to localize content such as adverts and for statistical purposes. This process is also known as localization.
The problem with Internet based geo-targeting is that it tends to be a rather inprecise affair and can not be relied upon to be 100% accurate. In order to obtain a web site's visitors geographical location. We first need to obtain a visitors IP address and then compare this address to a database of known (county specific) IP ranges. However, the accuracy and performace of many of the freely available SQL database or CSV based solutions tends to be extremely poor.
The first thing you need to do in order to create a recursive function is to create a recursive function unless you already have a recursive function, in which case, just use your recursive function
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.