PHP Classes

File: cleanoutput.example.php

Recommend this page to a friend!
  Classes of Jon Gjengset  >  Clean Output  >  cleanoutput.example.php  >  Download  
File: cleanoutput.example.php
Role: Example script
Content type: text/plain
Description: Example of usage of the CleanOutput class
Class: Clean Output
Reformat HTML and XML documents
Author: By
Last change: Example has been rid of MANY errors
Date: 15 years ago
Size: 1,021 bytes


Class file image Download


//If you want OB, put this on the top and see the bottom line:

//Constuction of object
$cleaning_object = new CleanOutput();

//Get HTML
$google_HTML = file_get_contents("");

//Clean and print

//Reset object for new use

/* Configuring output */
$cleaning_object->trace = TRUE; //This enables trace-lines
$cleaning_object->indent = "\t"; //This changes the indent-level to be a tab

//Clean, print and reset with new configuration

/* Cleaning XML */
$rss_feed = file_get_contents("");

//Continuation of OB
$o = $cleaning_object->ob_clean(ob_get_contents());
//End OB

For more information send a message to info at phpclasses dot org.