Hallo zusammen
In der Firma benutzen wir ein PHP Tool, welches Domainnamen inkl. Domaindaten wie z.B. die MX Records erstellt und auf der Webseite ausgibt (siehe Quellcode unten aufgeführt)
Wenn ich nun im Browser (Chrome oder IE) die Daten der Webseite als Excel ausgebe funktioniert das zwar (siehe Beilagen) jedoch wird oberhalb der Daten eine Leerzeile eingefügt wie kann ich das korrigieren?
Im Firefox erscheint sogar ein leeres Excel auch wenn ich den Browser Cache geleert habe und F5 gedrückt habe
Ich bin PHP noch nicht so versiert und danke für die Hilfe
In der Firma benutzen wir ein PHP Tool, welches Domainnamen inkl. Domaindaten wie z.B. die MX Records erstellt und auf der Webseite ausgibt (siehe Quellcode unten aufgeführt)
PHP-Code:
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
# printf("<br><br><table class='table table-hover table-bordered'>\n");
printf("<br><br><table id='example' class='table table-striped table-bordere
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
printf("<br><br><table class='table table-hover table-bordered'>\n");
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
# printf("<br><br><table class='table table-hover table-bordered'>\n");
printf("<br><br><table id='example' class='table table-striped table-bordere
printf(" <thead>\n");
printf(" <tr>\n");
printf(" <td>Domain</td>\n");
printf(" <td>ohne www</td>\n");
printf(" <td>www</td>\n");
printf(" <td>MX IP</td>\n");
printf(" <td>MX Eintrag</td>\n");
printf(" </tr>\n");
printf(" </thead>\n");
printf(" <tbody>\n");
foreach ($domain as $entry) {
$entry = idn_to_ascii($entry);
$a_record = dns_get_record($entry, DNS_A);
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
# printf("<br><br><table class='table table-hover table-bordered'>\n");
printf("<br><br><table id='example' class='table table-striped table-bordere
printf(" <thead>\n");
printf(" <tr>\n");
printf(" <td>Domain</td>\n");
printf(" <td>ohne www</td>\n");
printf(" <td>www</td>\n");
printf(" <td>MX IP</td>\n");
printf(" <td>MX Eintrag</td>\n");
printf(" </tr>\n");
printf(" </thead>\n");
printf(" <tbody>\n");
foreach ($domain as $entry) {
$entry = idn_to_ascii($entry);
$a_record = dns_get_record($entry, DNS_A);
$www = dns_get_record("www." . $entry, DNS_ANY);
$mx = dns_get_record($entry, DNS_MX);
printf(" <tr>\n");
printf(" <td>%s</td>", $entry);
printf(" <td>");
foreach ($a_record as $arr) {
echo $arr['ip'];
}
printf(" </td>");
printf(" <td>");
foreach ($www as $arrwww) {
if ($arrwww["type"] == "CNAME") {
$cname = $arrwww["target"];
$cname = dns_get_record($cname, DNS_A);
foreach ($a_record as $arrcname) {
echo $arrcname["ip"], "<br>";
}
echo "(" . $arrwww["target"], ")";
} else {
echo $arrwww["ip"];
}
}
printf(" </td>");
printf(" <td>");
foreach ($mx as $arrmx) {
$mx1 = $arrmx['target'];
$mx1 = gethostbyname($mx1);
echo $mx1, " <br>";
}
printf(" </td>");
printf(" <td>");
foreach ($mx as $arrmx) {
echo $arrmx['target'], " <br>";
}
printf(" </td>");
}
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbei
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
# printf("<br><br><table class='table table-hover table-bordered'>\n");
printf("<br><br><table id='example' class='table table-striped table-bordere
printf(" <thead>\n");
printf(" <tr>\n");
printf(" <td>Domain</td>\n");
printf(" <td>ohne www</td>\n");
printf(" <td>www</td>\n");
printf(" <td>MX IP</td>\n");
printf(" <td>MX Eintrag</td>\n");
printf(" </tr>\n");
printf(" </thead>\n");
printf(" <tbody>\n");
foreach ($domain as $entry) {
$entry = idn_to_ascii($entry);
$a_record = dns_get_record($entry, DNS_A);
$www = dns_get_record("www." . $entry, DNS_ANY);
$mx = dns_get_record($entry, DNS_MX);
printf(" <tr>\n");
printf(" <td>%s</td>", $entry);
printf(" <td>");
foreach ($a_record as $arr) {
echo $arr['ip'];
}
printf(" </td>");
printf(" <td>");
foreach ($www as $arrwww) {
if ($arrwww["type"] == "CNAME") {
$cname = $arrwww["target"];
$cname = dns_get_record($cname, DNS_A);
foreach ($a_record as $arrcname) {
echo $arrcname["ip"], "<br>";
}
echo "(" . $arrwww["target"], ")";
} else {
echo $arrwww["ip"];
}
}
printf(" </td>");
printf(" <td>");
<?php
include '../includes/head.php';
$currentPage = 'dig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
<style>
.navbar
{
background-color: #fff;
border:1px solid #26A2B1;
}
.navbar-light .navbar-nav .nav-link.active {
color: #135158 !important;
}
.navbar-light .navbar-nav .nav-link {
color: #26A2B1;
}
.dropdown-menu {
border-color: #26A2B1;
}
.dropdown-item {
color: #26A2B1;
}
.navbar-toggler {
border-color: #26A2B1 !important;
}
.input:focus {
outline: none !important;
border:1px solid red;
box-shadow: 0 0 10px #26A2B1;
}
.bg-ws {
background-color #92d0d8 !important;
}
</style>
<nav class="navbar navbar-expand-lg navbar-light bg-ws">
<a class="navbar-brand" href="#"> <img src="https://www.webstyle.
<button class="navbar-toggler" type="button" data-toggle="collapse" data-targe
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li>
<a class="nav-link <?php if ($currentPage === 'index') {echo 'active';}
</li>
<li>
<a class="nav-link <?php if ($currentPage === 'dns') {echo 'active';} ?>
</li>
<!-- <li>
<a class="nav-link <?php if ($currentPage === 'info') {echo 'active';} ?
</li>
--> <li>
<a class="nav-link <?php if ($currentPage === 'sms') {echo 'active';} ?>
background-color #92d0d8 !important;
}
</style>
<nav class="navbar navbar-expand-lg navbar-light bg-ws">
<a class="navbar-brand" href="#"> <img src="https://www.webstyle.
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><br>
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbeiten">
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
# printf("<br><br><table class='table table-hover table-bordered'>\n");
printf("<br><br><table id='example' class='table table-striped table-bordered nowrap'>\n");
printf(" <thead>\n");
printf(" <tr>\n");
printf(" <td>Domain</td>\n");
printf(" <td>ohne www</td>\n");
printf(" <td>www</td>\n");
printf(" <td>MX IP</td>\n");
printf(" <td>MX Eintrag</td>\n");
printf(" </tr>\n");
printf(" </thead>\n");
printf(" <tbody>\n");
foreach ($domain as $entry) {
$entry = idn_to_ascii($entry);
<?php
include '../includes/head1.php';
$currentPage = 'bulkdig';
$nameservers?>
<body>
<?php
require '../includes/nav.php';
?>
<h1 class="center">Bulk DIG Tool</h1>
<div class="container center">
<form action="bulk_dig.php" method="POST">
<textarea name="domains" class="form-control" rows="10" cols="80"></textarea><br>
<input type="submit" name="btn_submit" class="btn btn-success" value="Verarbeiten">
</form>
<?php
if (isset($_POST['domains'])) {
$idn_domain = $_POST['domains'];
$domain = $idn_domain;
$domain = explode("\r\n", $domain);
$domain = preg_replace('/\s+/', '', $domain);
# printf("<br><br><table class='table table-hover table-bordered'>\n");
printf("<br><br><table id='example' class='table table-striped table-bordered nowrap'>\n");
printf(" <thead>\n");
printf(" <tr>\n");
printf(" <td>Domain</td>\n");
printf(" <td>ohne www</td>\n");
printf(" <td>www</td>\n");
printf(" <td>MX IP</td>\n");
printf(" <td>MX Eintrag</td>\n");
printf(" </tr>\n");
printf(" </thead>\n");
printf(" <tbody>\n");
foreach ($domain as $entry) {
$entry = idn_to_ascii($entry);
$a_record = dns_get_record($entry, DNS_A);
$www = dns_get_record("www." . $entry, DNS_ANY);
$mx = dns_get_record($entry, DNS_MX);
printf(" <tr>\n");
printf(" <td>%s</td>", $entry);
printf(" <td>");
foreach ($a_record as $arr) {
echo $arr['ip'];
}
printf(" </td>");
printf(" <td>");
foreach ($www as $arrwww) {
1 1 105 Top
Im Firefox erscheint sogar ein leeres Excel auch wenn ich den Browser Cache geleert habe und F5 gedrückt habe
Ich bin PHP noch nicht so versiert und danke für die Hilfe
Kommentar