ralfhortt/geodata

A composer package to retrieve geodata

0.3.1 2024-10-14 19:36 UTC

This package is auto-updated.

Last update: 2024-11-14 19:50:37 UTC


README

Installation

composer require ralfhortt/geodata

Example

<?php
require 'vendor/autoload.php';

use RalfHortt\GeoData\Address;

$address = new Address('Mainzer Str. 37, 66111 Saarbrücken, Deutschland');
?>
<dl>
<dt>Straße</dt>
<dd><?= $address->getStreet() ?></dd>
<dt>Hausnummer</dt>
<dd><?= $address->getStreetNumber() ?></dd>
<dt>PLZ</dt>
<dd><?= $address->getPostCode() ?></dd>
<dt>Stadt</dt>
<dd><?= $address->getCity() ?></dd>
<dt>Land</dt>
<dd><?= $address->getCountry() ?></dd>
<dt>Latitude</dt>
<dd><?= $address->getLatitude() ?></dd>
<dt>Longitude</dt>
<dd><?= $address->getLongitude() ?></dd>
</dl>