PHP Articles

On User-Defined Timezones in PHP


PHP provides some nice date manipulation functions that work very well in combination with each other. However, they only handle dealing with the server’s timezone. Adding the feature for shifting dates to a user-defined timezone can be a very unpleasant experience, as we know first hand. In this article, we discuss the problems we encountered, and present our solution.

Introduction to Design Patterns Using PHP

What are Design Patterns

Design Patterns are simply defined solutions to common problems. Design patterns are not created by someone who sits in a room and decides to make a design pattern instead design patterns are proven solutions that are implemented over and over again through different projects. This re-use of the solution itself becomes a pattern. Don’t be intimidated by the fancy names given to design patterns, such as faade, singleton or observer, they are exactly that just fancy names given to repeatable solutions.

A Dynamic PHP Thumbnail Gallery Part 2

Welcome back to part two of the Code Gallery Spotlight of the PHP based Photo Gallery called “AutoGallery”. Last week, I discussed with you the general idea of the AutoGallery’s image management and introduced the constructor used to initialize the variables in the AutoGallery class. This week, I’ll take a look at the two functions that the constructor calls after initialization resize() and cleanup() and how they perform the necessary management of the gallery images. Let’s start with the resize() function.

A Dynamic PHP Thumbnail Gallery part 1

Today I’ll be starting a new series focusing on the use of PHP’s image manipulation functions to create a sharp-looking web based photo gallery. If you have been working with PHP for any reasonable length of time (or for that matter, really looked at our own Code Gallery) you’ll notice that there have been many different types of PHP scripts focused on creating “thumbnail” images. This week’s spotlight takes that concept a few steps further and includes some great features like multiple-gallery support, the addition of a border around your thumbnails, and a gallery indexing system used to speed up the web page as a whole.

Creating a Secure PHP Login Script
· 4

Explains how to create a secure PHP login script that will allow safe authentication. Features remember-me function using cookies, validates logins on each request to prevent session stealing.

Create a Simple, Effective PHP Form for Your Web Site

If you have been struggling to set up forms on your web site using cgi, then definitely read this article. Installing a simple PHP form is much easier and faster than installing a cgi form and doesn’t need any programming experience.

PHP Interacting with J2ME
· 1

You my have noticed in last year or two there has been an increasing boom in technology in the area of mobile handsets and mobile software development. Wireless technology is not only becoming more commonplace, but also more affordable. To support this even further, a survey released by IDC projected revenues in wireless gaming alone will generate approximately 72.2 million by 2007. Along side with mobile gaming there will be an ever-increasing demand for mobile applications.

An Alternative to Perl: Shell Scripting With PHP
· 1

I know that you all want to get rid of Perl Scripts because of their complexity and the fact that Perl is not an easy language to learn. With the introduction of PHP version 4.2, PHP has started supporting a new SAPI (Server Application Programming Interface) called CLI (Command Line Interface). This facility was introduced to help developers create small shell application (scripts) with PHP, meaning that you can kiss Perl goodbye forever!

A Simple Web Search Engine

Every user expects a search engine on any Web site they visit. Unfortunately, search engines are extremely complex to develop. They require massive amounts of resources and time to implement. Today I’ll show you how to use a MySQL (or any SQL database) to create your own basic search engine.

Search Engine Friendly PHP Pages

When writing scripts, it is extremely important to have to ability to transfer information from one script to another. A common method to do this is with the GET convention. Search engine Web spiders, however, tend to ignore pages whose URL contains GET method parameters. If you’re not sure what a GET method parameter is, here’s an example of a URL with GET method parameters:

Search Engines vs. Database-Driven Websites – Optimizing PHP

Dear Jim

I have a question regarding a e commerce site using PHP extensions vs. html. That is, I have seen at this SEO site that there might be an issue with search engines being able to crawl this kind of a site, since these are javascript sites I think there might be reason to worry, is it true? What should I do?

Working with Permissions in PHP, Part 1

In the past few columns, I have been discussing using PHP’s file I/O capabilities for manipulating both files and directories. This week, we’ll take a slight detour from a strictly PHP-related subject and discuss file permissions in Unix systems. If you are using PHP in a Windows environment (or other environment without a permission system), this column may not apply to you.

Arrays in PHP: Part 2

Today we’ll continue our discussion of arrays in PHP including the use of associative and multidimensional arrays.

In my last article, we introduced a new array data type in PHP and covered its fundamentals. Today we’ll dive deeper into arrays and introduce a type of array called an associative array and a more complex type of array — the multidimensional array.

Arrays in PHP: Part 1

What exactly is an array?

An array is a variable type in PHP that allows the programmer to associate one value directly to another value or simply take a set of data and organize it into a list format (much like a table). It can be used in many ways to store and organize data quickly and efficiently. It is one of the more useful data types available to any programming language.

Introduction to WAP using WML, ASP and PHP
· 4

By Jean-Baptiste Minchelli

As technology changes, so do the tools that we use to manipulate it. Today the Internet is available from a number of devices, both connected and portable.

Ross Dunn Answers SEO Questions
· 1

For over six years, Ross Dunn and StepForth Placement have provided search engine optimization and placement services to a wide array of businesses and organizations. The staff at StepForth are experts in the fields of search engine marketing, search engine friendly design and, of course, search engine placement. They also follow the business of search engines like sports fans follow the playoffs. They welcome questions relating to the search engine industry and articles they have written.

Creating PDF Files in PHP

The PDF (or portable document format) file is an amazingly versatile format for transferring what usually starts as a hard copy version of a document over the Internet.

Image Resizing with PHP

If you’re anything like me, you’re probably lazy (and if you’re not, give yourself a pat on the back!).

Basic PHP Syntax
· 1

This article covers basic PHP syntax, including variable usage, variable types, and several ways of printing variables to the web browser.

Easy Web Site Personalization With PHP

Is your web site dynamic enough to address your visitors by name?

An Introduction to Classes in PHP

In this article, I will present a method for creating a very simple shopping cart in PHP. I assume you have a basic understanding of PHP or knowledge of an object- oriented language like C++ or Java. I will first introduce object orientation in PHP, and I guess many of you feel comfortable with this topic, so you may skip on to the section that deals with object oriented code.