WannaKnow: HTML, MYSQL, PHP3, JavaScript - Download Textfile (ASCII, *.txt oder *.pdf)

Beitrag lesen

I am looking for a quick and simple solution for following task:

On all (meaning: many) generated HTML-pages I intend to offer a DOWNLOAD of a textfile, according to the text of the HTML-page.

The textfiles (ASCII, *.txt or *.pdf  - depending on what is easier to program) should contain: the whole text-contents (also in table-layout) of the HTML-pages (except images, links etc.).

Techncal Info:  The HTML-pages have been programmed with PHP3 and JavaScript (many interrogations) and read data from a database with MYSQL.

So far I only would be able to realize this either doing a lot of  programming (i.e. to define the page size, row witdth, change special characters, transfer tables 1:1 ...) or I would have to ask the surfer to use the browser features to save the HTML-page as a textfile (but last solution shall not be used although the result is perfect).

I hope there is a function or a program (freeware) which will generate the textfiles automaticillay during the process of programming the website at a time I can choose myself by just placing 1 comand into the program.

Who has got a good idea? I would be very happy to hear about some trick and tips.

__________________________________________________________

Suche schnelle, einfache Lösung für folgende Aufgabe:

Auf allen (d.h. sehr vielen) generierten HTML-Seiten möchte ich jeweils einen entsprechenden DOWNLOAD von einem Textfile anbieten.

Die Textfiles (ASCII, *.txt oder *.pdf  - je nachdem, was einfacher zu programmieren ist) sollen beinhalten: den gesamten  Text-Inhalt (auch in Tabellen-Form) der zu sehenden HTML-Seite (außer Bilder, Links etc.).

Technische Info:  Die HTML-Seiten sind u.a. mit PHP3 und Javascript programmiert (viele Abfragen) und lesen mit MYSQL Daten aus der Datenbank aus.

Bisher würde ich dieses nur durch aufwendige Programmierung  (u. a. definieren der Seitengröße, Zeilenbreite , Umwandlung sämtlicher Sonderzeichen, Tabellen 1:1 umsetzen etc.) realisieren können oder den Surfer bitten, über den Browser die Datei als Textfile zu speichern (letzteres soll aber nicht gemacht werden, obwohl das Ergebnis hervorragend ist).

Ich hoffe, es gibt irgendeine Funktion oder ein Programm (Freeware), welches die Textfiles im Zuge der Programmierung der WebSite zu einem von mir gewählten Zeitpunkt automatisch generiert, indem ich z.B. einfach nur 1 Befehl in das Programm hierfür einbinde.

Wer hat eine gute Idee? Über Tips und Trick würde ich mich sehr freuen.