PhpRiot
Articles tagged PHP
Displaying articles 21 to 40 of 59

Detecting Ajax Requests With PHP Snippet

In this PhpRiot Snippet I will show you how you can check if a HTTP request is an Ajax request.

Downloading a Remote File With cURL and PHP Snippet

In this PhpRiot Snippet I will show you how to download a file from another web site and save it to disk.

Using Return Codes in PHP Snippet

In this PhpRiot Snippet I will show you to execute a command on your server and use its return code.

Singleton Classes in PHP Snippet

In this PhpRiot Snippet I will show you how to create and use singleton classes.

Storing Images in MySQL Revisited

This article shows you how you can store images in MySQL using the Blob column type. I will show you to create a file upload form, then store the uploaded file in the database. The concepts covered in this article can apply to all files in general, not just images. This is an updated version of a similar article that already appears on PhpRiot.

Zend Framework 101: Zend_Service_Amazon_S3

In this article I will introduce you to the Zend_Service_Amazon_S3 component of the Zend Framework. This component makes use of Amazon Web Services (AWS) to manage files on Amazon's Simple Storage Service (S3).

Zend Framework 101: Zend_Session

In this article I will introduce you to the Zend_Session component of the Zend Framework. This component is built upon PHP's native session-handling functionality, making it easier to manage session data, as well as providing more advanced features.

Zend Framework 101: Zend_Soap

In this article I will introduce you to the Zend_Soap component of the Zend Framework. This component allows you to easily create and consume SOAP web services. We will create a simple web service with several methods using Zend_Soap_Server, and consume the service with Zend_Soap_Client.

Zend Framework 101: Zend_Log

This article shows you how to use Zend_Log, the logging component of the Zend Framework. It allows you to record messages from your application however you please. In this article I will show you how to record messages to a log file. Additionally, if you use the Firebug and FirePHP plug-ins for Firefox, Zend_Log can be extremely useful for application development and debugging. I will also show you how to achieve this.

Zend Framework 101: Zend_Registry

In this article in the Zend Framework 101 series I will introduce you to the Zend_Registry class. This class used is to allow you manage variables and objects in the global application namespace. This is used as an alternative to using global variables in PHP. I will show you how to use the Zend_Registry class and also provide a practical example of where it would be useful to use the registry.

Zend Framework 101: Zend_Loader

In this article I will introduce you to Zend_Loader, a Zend Framework class used to automatically load other classes. Typically you would use include_once or require_once when you want to load a class but using Zend_Loader you don't have to.

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.