Example #1
0
<?php

require_once 'firebaseLib.php';
// --- This is your Firebase URL
$url = 'https://epicsuprc.firebaseio.com/';
// --- Use your token from Firebase here
$token = 'LKWz7g6fTWHrl4FG405vjofLkx3eIVsHDTyV1u34';
// --- Here is your parameter from the http GET
$arduino_data = $_GET['arduino_data'];
$arduino_data_post = $_POST['name'];
// --- Set up your Firebase url structure here
$firebasePath = '/';
/// --- Making calls
$fb = new fireBase($url, $token);
$dateTime = new DateTime();
$dataTimeTimeStamp = $dateTime->getTimestamp();
$test = array("time" => $dataTimeTimeStamp, "data" => $arduino_data);
$response = $fb->push($firebasePath . '/', $test);
?>

<html> Test Page </html>
Example #2
-1
<?php

require_once 'firebaseLib.php';
// --- This is your Firebase URL
$url = 'YOUR FIREBASE URL';
// --- Use your token from Firebase here
$token = 'YOUR TOKEN HERE';
// --- Here is your parameter from the http GET
$YOUR_data = $_GET['YOUR_data'];
// --- Set up your Firebase url structure here
$firebasePath = '/';
/// --- Making calls
$fb = new fireBase($url, $token);
$response = $fb->set($firebasePath, $rfidid);
sleep(2);
printf("Result: %s\n", $response);
sleep(2);
<?php

require_once "./puntasalute.php";
require_once 'firebaseLib.php';
$url = 'https://blistering-inferno-7515.firebaseio.com/';
$fb = new fireBase($url);
$current_level = getCurrentTideLevel();
$fb->set('', $current_level);
Example #4
-3
<?php

require_once 'firebaseLib.php';
// --- This is your Firebase URL
$url = 'https://washtime.firebaseio.com/';
// --- Use your token from Firebase here
$token = 'm0BM8Wgd0Kyw61i7cz7hvS0R4uF4vcgi6faFk6Ql';
// --- Here is your parameter from the http GET
$arduino_data = $_GET['arduino_data'];
// --- $arduino_data_post = $_POST['name'];
// --- Set up your Firebase url structure here
$firebasePath = '/';
/// --- Making calls
$fb = new fireBase($url, $token);
$response = $fb->push($firebasePath, $arduino_data);
sleep(2);