PHP-MBTiles-Server
PHP-MBTiles-Server copied to clipboard
PHP MBTiles Server
I have added some simple security updates with this pull. * Preventing SQL injection with binding parameters instead of hard coding into SQL string. * Checking if the requested database...
``` RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # db, z x y .png RewriteRule tile/(.*)/(.*)/(.*)/(.*)\.jpg$ "mbtiles.php?db=$1&z=$2&x=$3&y=$4" [L] RewriteRule tile/(.*)/(.*)/(.*)/(.*)\.png$ "mbtiles.php?db=$1&z=$2&x=$3&y=$4" [L] ```
I think there is a needs to escape some bad ```$_GET``` variables ``` $zoom = intval($_GET['z']); $column = intval($_GET['x']); $row = intval($_GET['y']); $db = preg_replace("/[^a-z0-9_]/i","",$_GET['db']); $conn = new PDO("sqlite:". $db...
demo links in the README are currently saying "Internal server error" http://projects.bryanmcbride.com/php-mbtiles-server/leaflet.html & http://projects.bryanmcbride.com/php-mbtiles-server/openlayers.html