Generate tiles like GDAL2TILES in PHP