PHP <-> Perl Bridge using cURL

Using cURL to submit requests from PHP into Perl allows graceful reuse of code with a system with a robust core of Perl code and a PHP web interface. The Perl code accepts a module name, sub/function name, and a set of parameters. It includes the… more »

Google Maps API - Distance Calculator - PHP Example

This code gets the distance, in miles, between two US Zip codes (04429 and 02135). You can substitute other origins and destinations. <?php function curl_request($sURL,$sQueryString=null) { $cURL=curl_init(); curl_setopt($cU… more »

PHP Text Highlighter

This snippet accepts an array of words, and a descriptive name which can be used to reference the words, like so: $this->scan(array('mysql','css','js','content management system', 'xhtml','xml','rss','html','lamp','ria', 'sugar','php','zen… more »

Serializing Data to Pass between Perl and PHP

The objective of this task was to determine if data serialized by PHP could be decoded by Perl. The first step was to create some serialized data. In this case, the data is being used to define an interface. An associative array was used, with th… more »

XML Fed Form Interface

This is a demonstration of how you can use XML to feed PHP to generate a form. It is helpful when a flexible form interface is needed. This example includes the name of the field, the length, a regex validation string, default value, label for the inpu… more »

:: Next >>