Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <h1>Sprawdzanie dostepnosci serwera</h1>
- <?php
- $servername = "https://bogdan.hostinghouse.pl";
- $username = "tinfgrby_artur";
- $password = "1234";
- $dbname = "tinfgrby_z1v2";
- echo phpinfo();
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: ".$conn->connect_error);
- }
- $sql = "SELECT nazwa, adres_domeny, port, ilosc_prob FROM domeny1";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- echo "<table border='1'>
- <tr>
- <th>Nazwa hosta</th>
- <th>Domena hosta</th>
- <th>Port</th>
- <th>Ping</th>
- </tr>";
- // output data of each row
- while($row = $result->fetch_assoc()) {
- echo "<tr>
- <td>".$row["nazwa"]."</td>
- <td>".$row["adres_domeny"]."</td>
- <td>".$row["port"]."</td>
- <td>".$row["ilosc_prob"]."</td>
- </tr>";
- }
- echo "</table>";
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement