PDA

View Full Version : Cleaned-up Mapfiend scripts.



ksmith
08-12-2002, 02:43 PM
First a few warnings:

If you do not know PHP, stop now.

If you do not have PHP working on your webserver with libGD support, stop now.

The script needs some (a lot of) error checking added before you put it on a "live" webserver.

You need to have a temp directory where the script can write the .png files to.


To get this script working for personal use:

1. Download the pngmap.php.txt file I attatched to this post. (and rename it so your webserver will recognise it as a php script)

2. Copy the .map files into the same directory as the pngmap.php file

3. Create a temp directory in the directory that pngmap.php is in. (suggested mode 1777)

4. Get RBG.txt and put it in the same directory as pngmap.php (you're on your own for getting RGB.txt)

5. access http://servername/path/to/pngmap.php?map=Befallen.map

Cryonic
08-12-2002, 03:40 PM
You should be able to turn it into a php shell script for use from the command line for personal use.

#!/usr/local/bin/php
<?
#insert php code here
?>

I believe that you can still feed it variables from the command like you do on the web (e.g. page.php?map=befallen.map).