PhpRiot
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (10), JSON (2), MVC (1), MySQL (6), onbeforeunload (1), OOP (1), PHP (27), PhpDoc (1), PostgreSQL (6), Prototype (9), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

Buy My Book
Practical Web 2.0 Applications with PHP

Practical Web 2.0 Applications with PHP

Want to assert yourself as a cutting–edge PHP web developer? Take a practical approach...
PhpRiot Latest Articles
Displaying articles 1 to 20 of 36

Eight Weeks of Prototype: Week 6, Writing JavaScript Classes with Prototype New

While JavaScript is by design an object-oriented language, it hasn't always been the easiest language to create nicely structured code that is easily maintainable. Prototype helps with this by providing a number of useful features for creating classes, such as the ability to extend classes and to easily group all functions together by using function binding. In this article I will show you how to create classes using JavaScript and Prototype.

Eight Weeks of Prototype: Week 5, Ajax with Prototype New

In addition to all of the other useful classes Prototype gives to developers, it also provides a number of classes and methods for development of Ajax-enabled web applications. That is, it allows developers to easily perform HTTP sub-requests using XmlHttpRequest and to handle the response accordingly. In this article I will show you how Prototype makes Ajax development for developers by covering the functionality it provides. Additionally, I will show you how to easily transfer data between your JavaScript code and web server using JSON data.

Eight Weeks of Prototype: Week 4, Event Handling in Prototype

One of the most useful and important aspects of JavaScript developments is that of event handling. Prototype simplifies this process by providing a number of helpful methods for doing so. In this, the fourth article of "Eight of Weeks of Prototype", we will look at how Prototype helps with handling events.

Eight Weeks of Prototype: Week 3, Prototype Data Types

In this, the third article in the "Eight Weeks of Prototype" series, I will teach you about the different data types that can be used in Prototype (on top of the existing JavaScript data types). We will firstly look at the basic string and number types, then look at enumerable types such as arrays and hashes.

Eight Weeks of Prototype: Week 2, How Prototype Extends Elements

When you select elements from the Document Object Model (DOM) using the functions Prototype provides, each returned element is extended with extra functionality. In this, the second article in "Eight Weeks of Prototype," I will show you exactly how Prototype extends these elements.

Eight Weeks of Prototype: Week 1, Beginning with Prototype

Prototype is a JavaScript framework used to help with development of cross-browser code that is easy to maintain and extend. In this first article of "Eight Weeks of Prototype" I will teach you the fundamentals of Prototype, which you will hopefully find useful for all JavaScript code you write.

Generating Static Images of Google Maps

One useful feature of Google Maps is the ability to generate a static image of any longitude and latitude that you desire, as opposed to using the normal JavaScript-based interactive map. In this article I will show you how to request such static images. We will then combine this technique with the geocoder we created in the article Geocoding with PHP and the Google Maps API.

Creating Search Engine Friendly URLs In PHP Updated

One of the major reasons for using a server-side language such as PHP is for the ability to generate dynamic content. Often this will lead to single scripts that produce their content based on the input parameters (that is, the variables in the URL). This article covers various techniques and methods for representing these parameters in the URL in a clean and "friendly" manner, as well as then how to read the parameters.

Geocoding with PHP and the Google Maps API

Geocoding is the process of finding the longitude and latitude of a given address or location. The Google Maps service gives developers and web site owners free access to their geocoder, both using the Google Maps JavaScript API, as well as using the web service. In this article I will show you how to access the geocoder web service using PHP so that it can be used in your own applications.

Creating Custom Block Tags in Smarty

Smarty is a very powerful template engine for PHP that allows developers to extend its capabilities using custom plug-ins. There are several different types of plug-ins, each of which serves a different purpose. In this article we will look at how the block plug-in type works.

Reminding Users to Submit Forms

This article discusses a simple technique to remind users to submit a form on your web site before navigating to another page. This is especially useful for long forms where the submit button may be hidden at the bottom of the page, or when editing content in a content management system. The technique described in this article uses JavaScript and works in modern browsers such as Internet Explorer, Firefox and Safari.

Monitoring File Uploads using Ajax and PHP

Because of the limitations of HTTP, it is difficult to monitor the status of files as they are uploaded via HTML forms. While other programming languages have built-in methods to monitor file uploads, PHP does not. This article shows how to implement such a solution in PHP. We will use Ajax to retrieve information about a file as it is being uploaded and display the progress back to the user.

Application Logic Versus Template Logic

This article takes a look at separating application logic from template logic. We will use the Smarty Template Engine as the basis for the article and its examples.

Creating A Fulltext Search Engine In PHP 5 With The Zend Framework's Zend Search Lucene

This article covers the implementation of a fulltext search engine using PHP 5 and the Zend Framework. We will be using the Zend_Search_Lucene component to create and search our fulltext index.

Creating Sortable Lists With PHP And Ajax

You might have been in a situation before where you had a list of items in your database that needed to be output in a specific order. These items could be anything: perhaps a listing of your favourite movies or your favourite books. For whatever reason, you want them ordered in a custom way that can't be determined automatically (such as alphabetical). This article covers the implementation of a system that lets you easily define the order of such a list.

Creating Multi-Step Forms And Wizards In PHP

There will be many situations when creating web forms, that either you cannot accept all data on one page, either because certain responses result in a different set of subsequent questions, or because you form is so long that you need to split it up into multiple pages. The case could even be that you have a 1 page form, but you want to show confirmation of the form data prior to processing the data (e.g. showing a user their order before processing their credit card). This tutorial covers how to implement such forms using PHP. This will include covering the various issues that need to be taken into consideration, as well as a class to help build such forms. Finally, there will be real-world example of implementing a multi-page form using the class.

Other Uses For Smarty

Many people think of the Smarty Template Engine as a system for separating presentation from application logic. This is indeed true, but many people also only consider Smarty for outputting their web site HTML/XHTML. This brief article goes over other situations where Smarty may be useful in your PHP application.

Managing Your Data With DatabaseObject

DatabaseObject is a class I wrote three or four years ago, as a way of easily manipulating database data. It is not a replacement for a database abstraction class. In fact, it works very nicely with a database abstraction class, however, the version we have provided uses the native PHP PostgreSQL and MySQL database calls.

Understanding Transactions And Locking In PostgreSQL

In most modern relational databases there is support for concurrent operations. PostgreSQL is no different. While concurrency can drastically improve the performance of your application it also has many different implications to thread safety. For those of you who are not familiar with thread safety in general terms; thread safety is the process of ensuring that two threads cannot do the same operation at the same time. The following article discusses transaction control and table locking in PostgreSQL and is intended for an advanced audience.

Anti-Spam Techniques In PHP, Part 2

This short series of articles provides a few simple techniques for protecting yourself and your web site from spammers. It does this from two perspectives: 1. Protecting people (including yourself) who post to your web site from being spammed 2. Protecting your web site from being spammed (for example, blog spam) This is the second article in the series, and covers the issue of protecting your web site from spammers.