PHP API: Generate Random Gemini Data
Description
This PHP code generates a JSON response containing random Gemini data. It's a simple example and can be expanded for a more complex API.
Code Snippet
<?php
header('Content-Type: application/json');
$geminiData = array(
'name' => 'Gemini',
'sign' => '♊',
'element' => 'Air',
'modality' => 'Mutable',
'rulingPlanet' => 'Mercury & Venus',
'luckyNumber' => rand(1, 99),
'luckyColor' => ['Yellow', 'Orange'][rand(0,1)]
);
echo json_encode($geminiData);
?>