PhpRiot
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (28), PhpDoc (1), PostgreSQL (6), Prototype (11), 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...
Articles tagged PHP
Displaying articles 1 to 20 of 28

Eight Weeks of Prototype: Week 8, A Complete Prototype Example

So far in this series, "Eight Weeks of Prototype," I have shown you some of the extensive features the Prototype JavaScript framework provides. In this, the final article of the series, I will bring many of these features together into a simple example.

Eight Weeks of Prototype: Week 5, Ajax with Prototype

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.

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.

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.

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.

Cloning Google Suggest With Ajaxac

This article covers how to implement a system such as Google Suggest using JavaScript, CSS and PHP. To aid us in this process we will be using AjaxAC, an open-source framework written in PHP used to develop AJAX style applications. We will be implementing a clone of this application, from start to finish. This begins with setting up our frontend HTML file and CSS styles, creating our AjaxAC GoogleSuggestCloneJax application, and then linking it all together.

Searching Google With The Google API

This article covers performing search queries on Google using their API. This means you can transparently run a Google search in the background, and then present the results to your users however you want to. The Google API is a SOAP web service. SOAP (Simple Object Access Protocol) is an XML schema used for calling a remote procedures (usually) over the web. In this case, the remote procedure is Google search. In this article, we are going to create a single PHP script called google.php, to simply demonstrate how to query Google. Hopefully using this information, you will be able to come up with more advanced ways of using the API.

Storing Images In MySQL

This article is an introduction to using the blob column type in MySQL. The concept is introduced by familiarising users with uploading and storing images in a MySQL table.

An Introduction To PHP Sessions

This article is an introduction to using sessions in PHP.

Anti-Spam Techniques In PHP, Part 1

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)

Implementing An N-Level Nested Tree In PHP And PostgreSQL Appendix

Since creating the second part of the Nested Tree series, I've done further work on the nested tree class. This appendix article is not officially part of the "3 part series", but it is an addon article which may be continually updated with new ideas and snippets to include in the Nested Tree class. The reason these have been kept separate is because they are not core to the concept of implementing nested trees in your web site.