PHP code example of amos97 / firebase-php
1. Go to this page and download the library: Download amos97/firebase-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/ */
amos97 / firebase-php example snippets
use Plokko\Firebase\ServiceAccount;
//Use one of those methods:
$sa = new ServiceAccount('/path/to/your/serviceaccount/file.json');
$sa = new ServiceAccount('{"type":"service_account",..............}');
$sa = new ServiceAccount(['type'=>'service_account',/*...*/]);
$handler = new Google\Auth\Cache\MemoryCacheItemPool\MemoryCacheItemPool();
$sa->setCacheHandler($handler);