PHP Classes

File: documentation.txt

Recommend this page to a friend!
  Classes of Reza Salehi  >  html2word  >  documentation.txt  >  Download  
File: documentation.txt
Role: Documentation
Content type: text/plain
Description: documentation
Class: html2word
html and text parser
Author: By
Last change:
Date: 13 years ago
Size: 1,732 bytes


Class file image Download
'html2word' is a class which is used to parse files or html pages.
by using this class you can get a list of words which are used in the page
and number of them.
this class has a default method named 'show()' to return list of words and 
for example consider this lines az an html page with address below:

this is a test .
this is a new class.


$f=new html2word("", 15, '0');

----> output:
00002 ---> this
00002 ---> is
00002 ---> a
00001 ---> new
00001 ---> test
00001 ---> class

by set the last parameter to '1' , the class will filter unneseccery words:

$f=new html2word("", 15, '1');

----> output:
00001 ---> test
00001 ---> class

you can directly access the list of words and number by using 2 propoerty of this object like this:

#3: $f=new html2word("", 15, '0');

by runnig code #3 the properties are:


for example if you want to access number of word 'class' you must refer to $f->coun[1] and the word can be]
accessed at $f->uniq[1]

and there are 2 more properties as follows :

if you want to know number of words in a page you 'll use
	$f->total; // for script #1 equals to 9

if you want to know number of uniq words in page you 'll use
	$f->unum;  // for script #1 equals to 5


for more info contact
Reza Salehi
March 2003,