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: 20 years ago
Size: 1,732 bytes
 

Contents

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 numbers. for example consider this lines az an html page with address below: "http://www.example.com" contents: ------------------------------ <html> <h1> this is a test . </h1> <h2><b> this is a new class. </b></h2> </html> ------------------------------ #1: $f=new html2word("http://www.example.com", 15, '0'); $f->show(); ----> output: 00002 ---> this 00002 ---> is 00002 ---> a 00001 ---> new 00001 ---> test 00001 ---> class /---->output by set the last parameter to '1' , the class will filter unneseccery words: #2: $f=new html2word("http://www.example.com", 15, '1'); $f->show(); ----> output: 00001 ---> test 00001 ---> class /---->output you can directly access the list of words and number by using 2 propoerty of this object like this: #3: $f=new html2word("http://www.example.com", 15, '0'); by runnig code #3 the properties are: $f->uniq={'a','class','is','test','this'} $f->coun={'2','1','2','1','2'} 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 zaalion@yahoo.com Reza Salehi March 2003,