PHP code example of opwoco / forecast-io-php

1. Go to this page and download the library: Download opwoco/forecast-io-php 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/ */

    

opwoco / forecast-io-php example snippets



$WeatherService = new \Forecast\Service('<api-key>');
var_dump($WeatherService->fetch(25.79036, -80.13623));