PHP code example of ricbra / knmi-client
1. Go to this page and download the library: Download ricbra/knmi-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ricbra / knmi-client example snippets
leAdapter = new \Http\Adapter\Guzzle6\Client();
$client = new \Ricbra\Knmi\Client($guzzleAdapter);
$data = $client->getDaily(
new \DateTime('2012-01-01'),
new \DateTime('2012-01-03'),
[
'240'
],
[
'PX', 'PN'
]
);
$data = $response = $client->getHourly(
new \DateTime('2016-01-01 12:00'),
new \DateTime('2016-01-01 13:00'),
['240'],
['P']
);