/**
  * Initiates the class
  * @since 0.1
  */
 function __construct()
 {
     self::$instance = $this;
 }
Example #2
0
<?php

include '../../../../wp-load.php';
if (!class_exists('SiteInspector')) {
    include 'class-site-inspector.php';
}
$inspector = new SiteInspector();
if (isset($_GET['follow'])) {
    $inspector->follow = $_GET['follow'];
}
if (isset($_GET['domain'])) {
    $data = $inspector->inspect(str_replace('http:', '', str_replace('/', '', $_GET['domain'])));
}
if (isset($_GET['format']) && $_GET['format'] == 'json') {
    header('Content-type: application/json');
    echo json_encode($data);
    exit;
}
function format_records($records)
{
    ?>
		<table>
			<tr>
				<th>Host</th>
				<th>Class</th>
				<th>Type</th>
				<th>TTL</th>
				<th>Additional Info</th>
			</tr>
		<?php 
    foreach ($records as $record) {