javascript - JS/JSON 'Desktop Notifications' -
i no coding expert in way, have coded neat little thing tell if node up/down, use php script , chuck table (it can seen below, , yes , know messy, new this). looking add desktop notifications tell user when node pings down, , understand need use json this? stuck on. bear in mind have permissions code ask permissions enable notifications :) www.samaustin.nn.pe/nitrostatus.php
<?php $connection = @fsockopen("iphere", "porthere", $errno, $errstr, "2"); if(!$connection) { echo '<tr class="danger"> <td>1</td> <td><i class="icon-remove-circle"></i> node down! working on this!</td> </tr>'; } else { echo '<tr class="success"> <td>1</td> <td><i class="icon-ok-circle"></i> node up!</td> </tr>'; } ?>
Comments
Post a Comment