Archives for: "July 2011"

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 modu… 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 »