post request
This commit is contained in:
parent
b035d8c2d9
commit
49fb0c290f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
/.buildpath
|
||||
/.project
|
||||
/.settings
|
||||
/secret.php
|
||||
/config.php
|
||||
/test.php
|
||||
|
||||
@ -4,6 +4,7 @@ include_once ('sql.php');
|
||||
$sql = new SQL ();
|
||||
include_once ('string.php');
|
||||
include_once ('numbers.php');
|
||||
include_once ('webcron.php');
|
||||
include_once ('mail.php');
|
||||
include_once ('debug.php');
|
||||
// include_once ('markdown.php');
|
||||
|
||||
24
webcron.php
Normal file
24
webcron.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?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
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user