Skip to content

Instantly share code, notes, and snippets.

View Thomas2500's full-sized avatar
🇦🇹

Thomas Bella Thomas2500

🇦🇹
View GitHub Profile

Keybase proof

I hereby claim:

  • I am Thomas2500 on github.
  • I am thomas2500 (https://keybase.io/thomas2500) on keybase.
  • I have a public key whose fingerprint is 5FE5 CECD C948 FF4E A4CC 9A76 503C 37E4 BAE8 3E29

To claim this, I am signing this object:

@Thomas2500
Thomas2500 / update.php
Created August 12, 2017 15:22
PowerDNS Update
<?php
// SQL-class from https://git.bella.network/unterhaltungsbox/class-templates/blob/master/class/SQL.class.php
require "SQL.class.php";
$SQL = new SQL("localhost", "<username>", "<password>", "<database>");
if ($_GET["host"] == "bella.ml") {
// Check current record if update is needed
$ip = $SQL->single("SELECT `content` FROM `records` WHERE `name` = 'bella.ml' AND `type` = 'A'");
if ($ip == $_SERVER["REMOTE_ADDR"]) {