Subversion Repositories vnag

Rev

Rev 11 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11 daniel-mar 1
<?php
2
 
3
/*
4
 * VNag - Nagios Framework for PHP
5
 * Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
6
 * Licensed under the terms of the Apache 2.0 license
7
 *
8
 * Revision 2019-11-18
9
 */
10
 
11
// This file (index.php) is intended to be called by your browser.
12
// If you want to access via Nagios/Icinga or CLI, call "check_ping".
13
 
14
declare(ticks=1);
15
 
16
?><!DOCTYPE HTML>
17
 
18
<html>
19
 
20
<head>
21
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
22
        <title>Online ping</title>
23
        <meta name="robots" content="noindex">
24
</head>
25
 
26
<body>
27
 
28
<h1>Online ping</h1>
29
 
30
<?php
31
 
32
echo '<form action="'.htmlentities($_SERVER['SCRIPT_NAME']).'" method="GET">
79 daniel-mar 33
Host: <input type="text" name="H" value="'.htmlentities($_REQUEST['H'] ?? '').'" size="40">
11 daniel-mar 34
<input type="submit" value="Check">
35
</form>';
36
 
37
require_once __DIR__ . '/../../framework/vnag_framework.inc.php';
38
require_once __DIR__ . '/PingCheck.class.php';
39
 
40
$job = new PingCheck();
41
$job->http_visual_output    = VNag::OUTPUT_EXCEPTION;
42
$job->http_invisible_output = VNag::OUTPUT_ALWAYS;
43
$job->run();
44
unset($job);
45
 
46
?>
47
</body>
48
 
49
</html>