PHP code example of mathsgod / hko-weather
1. Go to this page and download the library: Download mathsgod/hko-weather 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/ */
mathsgod / hko-weather example snippets
use HKO\Weather;
$w = new Weather();
// English (default)
$data = $w->fetch();
// Traditional Chinese
$data = $w->fetch('tc');
// Simplified Chinese
$data = $w->fetch('sc');
print_r($data);