]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/infrastructure/php/d0_blind_id_test.php
Merge branch 'master' into martin-t/example-config
[xonotic/xonotic.git] / misc / infrastructure / php / d0_blind_id_test.php
1 <?php
2
3 require("d0_blind_id.inc");
4 $d0_blind_id_keygen = "/opt/d0_blind_id/bin/crypto-keygen-standalone";
5
6 // read raw POST data
7 list($status, $idfp) = d0_blind_id_verify();
8 $version = $_GET["version"];
9 $postdata = $_POST["foo"];
10
11 // log access
12 $ip = $_SERVER["REMOTE_ADDR"];
13 if($idfp)
14         syslog(LOG_NOTICE, "update notification was called by $idfp ($status, $postdata) at $ip for version $version");
15 else if($version)
16         syslog(LOG_NOTICE, "update notification was called by an unknown user at $ip for version $version");
17 else
18         syslog(LOG_NOTICE, "update notification was called by an unknown user at $ip");
19
20 header("Content-type: text/plain");
21 echo "0\n";
22 echo "file:///dev/null\n";
23
24 ?>