A modern PHP application that fetches an XML file from the GeoPlace API for a given date range and streams it directly to the browser as a download.
- PHP 8.2 or higher
- Composer 2.x
-
Install PHP dependencies:
composer install
-
Copy the environment template and fill in your credentials:
cp .env.example .env
Edit
.envand set:GEOPLACE_USR_NAMEGEOPLACE_USR_PWDGEOPLACE_AUTHCODE
Point your web server document root to the public/ directory, or use PHP's
built-in server for local development:
php -S localhost:8000 -t public/Visit http://localhost:8000/ in your browser. The file for the last 60 days
will be downloaded automatically.
Optional query parameters:
date_from— start date inY-m-dformatdate_to— end date inY-m-dformat
vendor/bin/phpunitvendor/bin/phpstan analysevendor/bin/php-cs-fixer fix --dry-run --diffApply fixes:
vendor/bin/php-cs-fixer fixBSD 3-Clause License. See original geoplace.php or repository history for
full text.