PHP Classes

File: htmlcleaner_demo_2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of troels knak-nielsen  >  htmlcleaner  >  htmlcleaner_demo_2.php  >  Download  
File: htmlcleaner_demo_2.php
Role: Example script
Content type: text/plain
Description: yet a demonstration of htmlcleaner
Class: htmlcleaner
Clean up MSHTML and Word HTML
Author: By
Last change:
Date: 12 years ago
Size: 843 bytes


Class file image Download
 * changed : 13. apr. 03
 * author :
 * download:
 * description :
 * demo of class htmlcleaner
 * this example opens a file named $filename in the current dir,
 * processes it and saves the contents
 * disclaimer :
 * this piece of code is freely usable by anyone. if it makes your life better,
 * remeber me in your eveningprayer. if it makes your life worse, try doing it any
 * better yourself.
    if (!isset(
$filename = 'name_of_file.html';
$content = join ('', file ($filename));
$content_cleaned = htmlcleaner::cleanup($content);
$fp = fopen ($filename, 'w');
fwrite ($fp, $content_cleaned);