Web

How to Displaying an RSS feed with PHP

Fadıl

Introduction

Whether you are retrieving information from a database or grabbing news headlines from another site, properly used caching can help reduce the run time of your PHP scripts and load on your server. Aside from the speed considerations, caching can also add dependability. By caching results from your database queries, you can still use the results in the event your database goes down.

Today we will look at a class designed to do caching, but first, let’s determine when we should use caching.

Displaying an RSS feed with PHP

Fadıl

Introduction

RDF Site Summary documents, or RSS, are an easy way to syndicate content onto your web site. More and more web sites are offering RSS feeds of their content that you can use to add substance to your own site.

RSS is an XML format that was designed by Netscape. Since their inception, RSS documents have gained wide popularity and are used by many major news portals and other web sites.

A Simple Web Search Engine

Fadıl

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.

Note: Today’s Code Gallery Spotlight requires that an SQL-compliant database be installed (such as MySQL). If a SQL database is not available, you can download one from<http://www.mysql.com/>.

How to Session Authentication

Fadıl

Web site authentication applies to most Web sites on the Internet. Implementation of authentication schemes, however, can vary significantly from one site to another.

Why use session authentication?

Let’s say you run the Web site www.myneatstore.com and you want your customers to be authenticated with a username and password before they are allowed to make purchases. To accomplish this, you could use a number of methods (the most obvious of which is the HTTP authentication headers).

Error Handling in PHP Part-I

Fadıl

Introduction

If you’re a developer, I’m sure you’ve experienced an error message in PHP. In fact, you should be quite familiar with the standard error message format such as this one caused by a call to the header() function after output as started:

Warning: Cannot add header information – headers already sent by (output started at /home/zend.com/proc.inc:6) in /home/zend.com/www/modify_account.php on line 41

This is a fairly typical error message — but did you know that this error message could be changed? In fact, not only can the format of the error message be changed, new features and logic (such as sending an e-mail when an error occurs) can also be developed. Today, we’ll explore custom error handling in PHP, and how you can use it to standardize and simplify error handling from within your scripts.