distancefinder/README.md

40 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2016-08-07 20:17:25 +00:00
Distance Finder
===============
2016-08-07 20:17:25 +00:00
PHP script allowing users to find the air distance between cities. Uses
information from Google if data not found in local database.
2016-08-07 20:17:25 +00:00
License
-------
2016-08-07 20:17:25 +00:00
None, yet. I'll have to come up with something.
2016-08-07 20:17:25 +00:00
Installation
------------
Change the following settings in bootstrap.php:
2016-08-07 20:17:25 +00:00
```
DB_HOST = The host on which your MySQL database is running. Usually localhost.
DB_NAME = The name of your MySQL database.
DB_USER = The user name for your MySQL database.
DB_PASSWORD = The corresponding password.
2016-08-07 20:17:25 +00:00
CSVFILE = The file you want to import to the database. Has to be in the
following format: City name, Country code, State code, Population,
Latitude, Longitude. Can be an empty file. Make sure this file exists
in the same folder as the install.php
```
2016-08-07 20:18:10 +00:00
Then go to http://yoursite.com/[subdirectory]/install.php and follow the
instructions. Depending on the size of the CSV file you are importing into the
database, this might take a while.
When the installation has finished, you might want to remove or rename install.php.
2016-08-07 20:17:25 +00:00
Troubleshooting
---------------
2016-08-07 20:17:25 +00:00
If you keep getting empty files when trying to download the distance list, make
sure that the web server has permissions to write in the folder
(e.g. chown www-data:www-data)