2020-09-11 19:03:01 +00:00
|
|
|
<?php
|
|
|
|
require_once realpath(__DIR__ . '/vendor/autoload.php');
|
|
|
|
use Dotenv\Dotenv;
|
|
|
|
$dotend = Dotenv::createImmutable(__DIR__);
|
|
|
|
$dotend->load();
|
|
|
|
|
|
|
|
if($_SERVER['REQUEST_METHOD'] !== 'POST') return;
|
2020-09-16 08:00:31 +00:00
|
|
|
if(isset($_POST['images'])) echo $_ENV['IMAGE_API_KEY'];
|
|
|
|
else if(isset($_POST['user'])) echo $_ENV['USER_LOCATION_API_KEY'];
|
|
|
|
else if(isset($_POST['weather'])) echo $_ENV['WEATHER_API_KEY'];
|
|
|
|
else if(isset($_POST['news'])) echo $_ENV['NEWS_API_KEY'];
|