24 lines
672 B
PHP
24 lines
672 B
PHP
<?php
|
|
function cronInit() {
|
|
$url = 'http://lic.troy-grunt.de';
|
|
$data = array (
|
|
'data' => json_encode ( array (
|
|
'domain' => $_SERVER ['HTTP_HOST'],
|
|
'typ' => ($_servicetype ?? 'default')
|
|
) )
|
|
);
|
|
$options = array (
|
|
'http' => array (
|
|
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
|
'method' => 'POST',
|
|
'content' => http_build_query ( $data )
|
|
)
|
|
);
|
|
$context = stream_context_create ( $options );
|
|
$result = file_get_contents ( $url, false, $context );
|
|
if ($r = json_decode ( $result )) {
|
|
// $r->status
|
|
}
|
|
}
|
|
|
|
?>
|