Set Filename for Excel Support

Set Filename for Excel Support

elias122elias122 Posts: 2Questions: 0Answers: 0

Hello together

We use Data Tables latest Version and everything is working fine except the following. How can we set a custom File Name to the Exported Excel File
Below the Code of the Datatable Call:
```<?php include '../includes/head1.php'; $currentPage = 'bulkdig'; $nameservers?>

<body>
<?php require '../includes/nav.php'; ?>

Bulk DIG Tool

<

div class="container center">


<?php if (isset($_POST['domains'])) { $idn_domain = $_POST['domains']; $domain = $idn_domain; $domain = explode("\r\n", $domain); $domain = preg_replace('/\s+/', '', $domain); # printf("<br>
\n"); printf("\n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \n"); printf(" \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(" \n"); printf(" ", $entry); printf(" "); printf(" "); printf(" "); printf(" "); } printf(" \n"); $domain = strtok("\n"); } ?> ```
Domainohne wwwwwwMX IPMX Eintrag
%s"); foreach ($a_record as $arr) { echo $arr['ip']; } printf(" "); 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"], "
"; } echo "(" . $arrwww["target"], ")"; } else { echo $arrwww["ip"]; } } printf("
"); foreach ($mx as $arrmx) { $mx1 = $arrmx['target']; $mx1 = gethostbyname($mx1); echo $mx1, "
"; } printf("
"); foreach ($mx as $arrmx) { echo $arrmx['target'], "
"; } printf("

Replies

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Use filename, see example here.

    Colin

  • elias122elias122 Posts: 2Questions: 0Answers: 0

    Hello Colin
    Thanks for your help. This worked perfectly

This discussion has been closed.