Login   Register  
PHP Classes
elePHPant
Icontem

File: htmlcleaner_demo_2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2003-04-13 12:05
Size: 843 bytes
 

Contents

Class file image Download
<?php
/*
 *    changed : 13. apr. 03
 *    author  : troels@kyberfabrikken.dk
 *    download: http://www.phpclasses.org/browse.html/package/1020.html
 *
 *    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.
 */
    
require_once('htmlcleaner.php');
    if (!isset(
$filename))
        
$filename 'name_of_file.html';
    
$content join (''file ($filename));
    
$content_cleaned htmlcleaner::cleanup($content);
    
$fp fopen ($filename'w');
    
fwrite ($fp$content_cleaned);
    
fclose($fp);
?>