Select Page

Get geocodes / coordinates of addresses with Google Maps API

<? $address = utf8_encode('1030 wien'); //Use this function to avoid problems with special characters, like German 'Umlaute' $response = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($address) . '&amp;sensor=true');...

PHP Linux Daemon

Today I found the package System_Daemon. It lets you run your (maybe never-ending) PHP daemon script in the background, generates Ubuntu start-stop files for init.d and is easy to install. It can be very useful if you want to write a server script with PHP, because...

Smarty: Dynamic variable names

If you want to access dynamic variable names in Smarty and cannot use arrays for any reason, you can use a Smarty var nested in another Smarty var. Example: </pre> {foreach from=$workingDays item = item name=workingDaysList} {$date_{$item}} {/foreach}...