PHP code example of holicz / pvgis
1. Go to this page and download the library: Download holicz/pvgis 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/ */
holicz / pvgis example snippets
use holicz\PVGIS\PVGIS;
use holicz\PVGIS\Adapter\PvgisAdapter;
use holicz\PVGIS\Enum\Database;
$latitude = '50.0898689';
$longitude = '14.4000936';
$pvgis = new PVGIS(new PvgisAdapter());
$electricityProduction = $pvgis->getElectricityProduction(
$latitude,
$longitude,
35, // Solar panels angle (not $monthlyProduction->getMonth();
// Sum of the monthly production
$monthlyProduction->getProduction();
}
$electricityProduction->multiply(1.86);