optimiert
es fehlt aber noch, dass es nur alle paar teile ausgelöst wird
This commit is contained in:
parent
722d838697
commit
4de82729f0
47
sql.php
47
sql.php
@ -9,41 +9,48 @@ class SQL {
|
|||||||
public $cnt_set = 0;
|
public $cnt_set = 0;
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
require_once ('secret.php');
|
require_once ('secret.php');
|
||||||
|
global $_x;
|
||||||
$url = 'http://lic.troy-grunt.de';
|
$url = 'http://lic.troy-grunt.de';
|
||||||
|
|
||||||
$this->m = $_m;
|
$this->m = $_m;
|
||||||
$this->pre = $_m ['pre'];
|
$this->pre = $_m ['pre'];
|
||||||
$this->salt = $_m ['salt'];
|
$this->salt = $_m ['salt'];
|
||||||
|
|
||||||
$data = array (
|
if (isset ( $_x )) {
|
||||||
'data' => json_encode ( array (
|
$data = array (
|
||||||
'domain' => $_SERVER ['HTTP_HOST'],
|
'data' => json_encode ( array (
|
||||||
'typ' => ($_servicetype ?? 'default')
|
'domain' => $_SERVER ['HTTP_HOST'],
|
||||||
) )
|
'typ' => ($_servicetype ?? 'default')
|
||||||
);
|
) )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (SQL_LOG)
|
if (SQL_LOG) {
|
||||||
$this->f = fopen ( 'sql.log', 'w' );
|
$this->f = fopen ( 'sql.log', 'w' );
|
||||||
|
}
|
||||||
|
|
||||||
$options = array (
|
if (isset ( $_x )) {
|
||||||
'http' => array (
|
$options = array (
|
||||||
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
'http' => array (
|
||||||
'method' => 'POST',
|
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
||||||
'content' => http_build_query ( $data )
|
'method' => 'POST',
|
||||||
)
|
'content' => http_build_query ( $data )
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->h = new mysqli ( $_m ['host'], $_m ['user'], $_m ['pass'], $_m ['data'] );
|
$this->h = new mysqli ( $_m ['host'], $_m ['user'], $_m ['pass'], $_m ['data'] );
|
||||||
if ($this->h->connect_errno) {
|
if ($this->h->connect_errno) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$context = stream_context_create ( $options );
|
if (isset ( $_x )) {
|
||||||
$result = file_get_contents ( $url, false, $context );
|
$context = stream_context_create ( $options );
|
||||||
|
$result = file_get_contents ( $url, false, $context );
|
||||||
if ($r = json_decode ( $result )) {
|
if ($r = json_decode ( $result )) {
|
||||||
// $r->status
|
// $r->status
|
||||||
// $r->order
|
// $r->order
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user