You can fetch multiple records from Firebase Realtime Database using the Firebase Realtime Database REST API. Here is an example in PHP using the Guzzle HTTP Client:

First, install the Guzzle HTTP Client:

composer require guzzlehttp/guzzle

Next, you can use the following code to fetch multiple records:

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://<DATABASE_NAME>.firebaseio.com/<TABLE_NAME>.json');
$data = json_decode($response->getBody(), true);

foreach ($data as $record) {
    print_r($record);
}

Note: Replace <DATABASE_NAME> and <TABLE_NAME> with your Firebase Realtime Database name and table name respectively.

Leave a Reply

Your email address will not be published. Required fields are marked *

Upgrade PHP Version without using cPanel setting