/media/sda-magnetic/david/Dokumente-15/fernuni-hagen/cs-i-ii/old-cs-2-03/php-graphix-2021-03-04/index.php


<?php 
session_start();
?>

<!DOCTYPE html>
<html> 
<head>
	<meta charset="UTF-8" />
	<title>traceroute graphicx</title> 
</head>
 
<body>
<center>


<div class="dropdown">
  <button class="dropbtn">Interfaces</button>
  <div class="dropdown-content">
    <a class="anormal" href="http://www.ituenix.de/phpBB3"><img src="phpBB3.png" height="24px"> phpBB3</a>
    <a class="anormal" href="http://www.ituenix.de/squirrelmail"><img src="squirrelmail.jpg" height="24px"> squirrelmail</a>
    <a class="anormal" href="http://www.ituenix.de/nextcloud"><img src="nextcloud.png" height="24px"> nextcloud</a>
    <a class="anormal" href="http://www.ituenix.de/owncloud"><img src="owncloud.png" height="24px"> owncloud</a>
  </div>
</div> 

<div class="dropdown">
  <button class="dropbtn">Tools</button>
  <div class="dropdown-content">
    <a class="anormal" href="http://www.ituenix.de/nettools/ping.php">ping</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/traceroute.php">traceroute</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/nslookup.php">nslookup</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/rnslookup.php">rnslookup</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/whois.php">whois</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/geoiuplookup.php">geoiuplookup</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/ip.php">ip</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/gnuplot.php">gnuplot</a>
  </div>
</div> 


<div class="dropdown">
  <button class="dropbtn">Webcams</button>
  <div class="dropdown-content">
    <a class="anormal" href="http://www.ituenix.de:8081/webcam.ogg"><img src="vlc.png" height="24px"> Webcam1</a>
    <a class="anormal" href="http://www.ituenix.de:8082/webcam.ogg"><img src="vlc.png" height="24px"> Webcam2</a>
    <a class="anormal" href="http://www.ituenix.de:8083/webcam.ogg"><img src="vlc.png" height="24px"> Webcam3</a>
    <a class="anormal" href="http://www.ituenix.de:8084/webcam.ogg"><img src="vlc.png" height="24px"> Webcam4</a>
    <a class="anormal" href="http://www.ituenix.de:8085/webcam.ogg"><img src="vlc.png" height="24px"> Webcam5</a>
    <hr>
    <a class="anormal" href="http://www.ituenix.de:8084/webcam.ogg"><img src="atmel.png" height="18px"> Webcam4</a>
  </div>
</div> 

<div class="dropdown">
  <button class="dropbtn"><img src="intel.png" width="64px"></button>
  <div class="dropdown-content">
    <a class="anormal" href="http://www.ituenix.de/nettools/sensors.php">Sensors - Host1</a>
    <a class="anormal" href="http://www.ituenix.de/nettools/cpuinfo.php">CPU-Info - Host1</a>
    <a class="anormal" href="http://www.ituenix.de:82/nettools/sensors.php">Sensors - Host2</a>
    <a class="anormal" href="http://www.ituenix.de:82/nettools/cpuinfo.php">CPU-Info - Host2</a>
  </div>
</div> 

<div class="dropdown">
  <button class="dropbtn">Websites&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
  <div class="dropdown-content">
    <a class="anormal" href="http://www.ituenix.de"><img src="ituenix2.png" height="24px"> http://www.ituenix.de</a>
    <a class="anormal" href="http://www.luckyleaks.org">http://www.luckylkeaks.org</a>
    <a class="anormal" href="http://www.yun7x.de">http://www.yun7x.de</a>
    <a class="anormal" href="http://www.ituenix.de/dr.greenthumb.de">http://dr.greenthumb.de</a>
    <a class="anormal" href="http://www.talkortell.de">http://www.talkortell.de</a>
    <a class="anormal" href="https://www.facebook.com/david.vajda.142"><img src="Facebook.svg" height="24px"> Facebook</a>
    <a class="anormal" href="https://twitter.com/DavidVajda5"><img src="Twitter.svg" height="24px"> Twitter</a>
    <a class="anormal" href="http://feeds.feedburner.com/RssUndItuenix"><img src="RSS.png" height="24px"> RSS</a>

  </div>

</div> 


<table>
<tr>
<td width="15%">
<img width="100%" src="../ituenix2.png" class="img2">
</td>
<td width="60%">
<br><br>
<font size="64px" face="Times New Roman">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Traceroute
</font>
 <small>traceroute graphicx</small>
</td>
</tr>
</table>


<style>
.dropbtn {
  background-color: grey;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.anormal {color:blue;}
.anormal:link {color:blue;}
.anormal:visited:focus {color:blue;}
.anormal:link {color:blue;}

.dropdown-content a:hover {background-color: #ddd;}


.dropdown:hover .dropdown-content {display: block;}


.dropdown:hover .dropbtn {background-color: black;} 


nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

nav li {
  list-style: none;
  margin: 0.0em;
  padding: 0;
  font-size: 1.5em;
}

@media (min-width: 45em) {
  nav ul {
    flex-direction: row;
  }
  nav li {
    flex: 1;
    font-size: 1em;
  }
}

nav a {
  display: block;
  font-weight: bold;
  text-align: center;
  color: white;
  background-color: black;
  background-image: linear-gradient(to top, black 10%, grey 100%);
}


nav li[aria-current] a {
  background-color: black;
  color: white;
}

.xxx1 {
background-image: linear-gradient(to top, black 10%, grey 100%);

}

.xxx1:hover {
background-image: linear-gradient(to top, black 10%, navajowhite 100%);

}

nav a:hover {
background-image: linear-gradient(to top, black 10%, navajowhite 100%);

}
nav a:focus,
nav li[aria-current] a:focus {
  color: white;
  background-color: black;
}

a:link { text-decoration: none;  color: white; font-family: Palatino;} a:visited:focus { text-decoration: none;  color: white; font-family: Palatino;}

a.a:link { text-decoration: none;  color: black; font-family: Courier;} a.a:visited { text-decoration: none;  color: black; font-family: Courier;} a.a:visited:focus { text-decoration: none;  color: black; font-family: Courier;}
</style>




<hr><br><br>
</div>
<a class="anormal" href="./traceroute-graphics.php">result</a>
</center>




<form method="post">
<textarea rows="1" cols="60" name="url">www.ituenix.de</textarea><br><br>
<input type="Submit" value="traceroute and ping">
</form>
<br><br>
<div style=" background-color: black; color: lightgreen;">
<b>
<code>
<?php
$url = $_POST["url"];
$url = htmlentities ($url);
$_SESSION ["url"] = shell_exec("traceroute ". $url);

$a = explode ("\n", $_SESSION ["url"]);

/*for ($i = 0;  $i < count ($a);  $i++)
    echo $a [$i] . "<br>";*/
 
$b = array ();
for ($i = 1;   $i < count ($a);  $i++)  {
    $b [$i] = explode (" ", $a [$i]);
        //echo $b [$i][3] . "<br>";
}
    
$c = array ();
for ($i = 1;   $i < count ($a)-1;  $i++) {
    $c [$i] = shell_exec ("ping -c 4 " . $b[$i][3]);
    echo $b [$i][3] . "<br>";
    echo $c [$i] . "<br><br>";
}

for ($i = 1;  $i < count ($a)-1;  $i++) {
    for ($j = 1;  $j < 5;  $j++) {
        $str1 = $c [$i];
        $str2 = explode ("\n", $c[$i]);
        $str3 = explode (" ", $str2[count ($str3)-2]);
        print_r ($str3);
        $str4 = explode ("=", $str3);
        $str5 = $str4 [2];
        print_r ($str4);
    }
}
    

?>
</b>
</code>
</div>

<?php
$adress = file_get_contents("../adress.txt");
$adress2 = file_get_contents("../adress2.txt");
echo $adress2;
echo $adress;
?>


</body>
</html>