<?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?><?
class autokeyword {
var $contents ;
var $encoding ;
var $keywords ;
var $wordLengthMin ;
var $wordOccuredMin ;
var $wordLengthMax ;
var $wordGoodArray ;
var $wordBlockArray ;
var $wordMaxCount ;
var $wordB ;
var $wordAddTitle ;
var $wordTitle ;
function autokeyword ( $params , $encoding )
{
$this -> wordGoodArray = array ( ) ;
$this -> wordBlockArray = array ( ) ;
$this -> encoding = $encoding ;
$this -> wordLengthMin = $params [ 'min_word_length' ] ;
$this -> wordLengthMax = $params [ 'max_word_length' ] ;
$this -> wordMaxCount = $params [ 'word_count' ] ;
if ( $params [ 'good_b' ] ) { $this -> wordB = 1 ; }
if ( $params [ 'add_title' ] > 0 )
{
$this -> wordAddTitle = $params [ 'add_title' ] ; $this -> wordTitle = $params [ 'title' ] ;
for ( $i = 0 ; $i < $this -> wordAddTitle ; $i ++ ) { $content .= $this -> wordTitle . ' ' ; }
$params [ 'content' ] = $content . ' ' . $params [ 'content' ] ;
}
if ( $params [ 'good_array' ] && $params [ 'good_word' ] == true ) { $this -> wordGoodArray = explode ( " \r \n " , $params [ 'good_array' ] ) ; }
if ( $params [ 'block_array' ] && $params [ 'block_word' ] == true ) { $this -> wordBlockArray = explode ( " \r \n " , $params [ 'block_array' ] ) ; }
$this -> contents = $this -> replace_chars ( $params [ 'content' ] ) ;
}
function replace_chars ( $content )
{
$content = strtolower ( $content ) ;
$content = strip_tags ( $content ) ;
if ( $this -> wordB == 1 ) { $content = preg_replace ( '[/b]!si' , '$1 $1' , $content ) ; }
$punctuations = array ( ',' , ')' , '(' , '.' , "'" , '"' , '<' , '>' , ';' , '!' , '?' , '/' , '-' ,
'_' , '[' , ']' , ':' , '+' , '=' , '#' , '$' , '"' , '©' , '>' , '<' , chr ( 10 ) , chr ( 13 ) , chr ( 9 ) ) ;
$punctuations = array_merge ( $this -> wordBlockArray , $punctuations ) ;
$content = str_replace ( $punctuations , " " , $content ) ;
$content = preg_replace ( '/ {2,}/si' , " " , $content ) ;
return $content ;
}
function parse_words ( )
{
$common = array ( "aaaaaaa" , "aaaaaaa" ) ;
$s = split ( " " , $this -> contents ) ;
$k = array ( ) ;
foreach ( $s as $key => $val ) {
if ( strlen ( trim ( $val ) ) >= $this -> wordLengthMin && strlen ( trim ( $val ) ) <= $this -> wordLengthMax && ! in_array ( trim ( $val ) , $common ) && ! is_numeric ( trim ( $val ) ) )
{
$k [ ] = trim ( $val ) ;
}
}
$k = array_count_values ( $k ) ;
$occur_filtered = $this -> occure_filter ( $k , $this -> wordOccuredMin ) ;
arsort ( $occur_filtered ) ;
$occur_filtered = array_flip ( $this -> wordGoodArray ) + $occur_filtered ;
array_splice ( $occur_filtered , $this -> wordMaxCount ) ;
$imploded = $this -> implode ( ", " , $occur_filtered ) ;
unset ( $k ) ;
unset ( $s ) ;
return $imploded ;
}
function occure_filter ( $array_count_values , $min_occur )
{
$occur_filtered = array ( ) ;
foreach ( $array_count_values as $word => $occured ) {
if ( $occured >= $min_occur ) {
$occur_filtered [ $word ] = $occured ;
}
}
return $occur_filtered ;
}
function implode ( $gule , $array )
{
$c = "" ;
foreach ( $array as $key => $val ) {
@ $c .= $key . $gule ;
}
return $c ;
}
}
?>
- <?
- if ( $ _POST [ 'q' ] )
- {
- header ( 'Content-type: text / html; charset = windows-1251' ) ;
- include_once ( "class.php" ) ;
- if ( $ _POST [ 'q' ] == '' || $ _POST [ 'q' ] == 'undefined' ) die ( '{"res": "error", "msg": "No data!"} ' ) ;
- $ params [ 'content' ] = iconv ( 'UTF-8' , 'windows-1251' , $ _POST [ 'q' ] ) ;
- $ params [ 'min_word_length' ] = 5 ; // minimum word length
- $ params [ 'max_word_length' ] = 100 ; // maximum word length
- $ params [ 'min_word_occur' ] = 2 ; // minimum number of posts
- $ params [ 'word_sum' ] = 245 ; // maximum length of all words (taking into account the space character)
- $ params [ 'block_word' ] = false ; // block stop words (which you do not want to add)
- $ params [ 'block_array' ] = 'hello' ; // list of stop words (new line separator)
- $ params [ 'good_word' ] = false ; // add favorite words (which you really want to add)
- $ params [ 'good_array' ] = 'habrabra' ; // list of favorite words (new line separator)
- $ params [ 'add_title' ] = 0 ; // add title (the number of times you want to add a title)
- $ params [ 'word_count' ] = 245 ; // maximum number of words
- $ params [ 'good_b' ] = false ; // read the words in the <b> tag as double
- $ keyword = new autokeyword ( $ params , "windows-1251" ) ;
- $ SQL [ 'keywords' ] = substr ( $ keyword -> parse_words ( ) , 0 , $ params [ 'word_sum' ] ) ;
- $ SQL [ 'keywords' ] = substr ( $ SQL [ 'keywords' ] , 0 , strrpos ( $ SQL [ 'keywords' ] , ',' ) ) ;
- echo '{"res": "ok", "x1": "<span>' . $ SQL [ 'keywords' ] . '</ span>"}' ;
- }
- ?>
- function SendPOST ( )
- {
- var data = document. form . content . value ;
- var title = document. form . title . value ;
- ajaxSendPOST ( 'ajax.php' , 'q =' + encodeURI ( title ) + '' + encodeURI ( data ) , SendCallback ) ;
- }
- function SendCallback ( answer ) {
- var ans = eval ( '(' + answer + ')' ) ;
- if ( ans. res == 'error' ) { alert ( 'Empty?' ) ; return ; }
- if ( ans. res ! = 'ok' ) { alert ( 'I don’t know what to say' ) ; return ; }
- keys_out = ans. x1 ;
- keys_out = keys_out. replace ( /, / g , '</ span> <span>' ) ;
- document. getElementById ( 'autokey_out' ) . innerHTML = keys_out ;
- key_span = document. getElementById ( 'autokey_out' ) ;
- key_click = key_span. getElementsByTagName ( 'span' ) ;
- for ( i in key_click )
- {
- key_click [ i ] . onclick = function ( ) {
- if ( document. form . keywords . value == '' )
- {
- document. form . keywords . value = this . innerHTML ;
- this . parentNode . removeChild ( this ) ;
- }
- else
- {
- document. form . keywords . value + = ',' + this . innerHTML ;
- this . parentNode . removeChild ( this )
- }
- }
- }
- }
- function ajaxSendPOST ( xmlpage , data , callback )
- {
- var xmlh = null ;
- if ( window. XMLHttpRequest )
- xmlh = new XMLHttpRequest ( ) ;
- else
- try
- { xmlh = new ActiveXObject ( 'Msxml2.XMLHTTP' ) ; }
- catch ( ex )
- { xmlh = new ActiveXObject ( 'Microsoft.XMLHTTP' ) ; }
- if ( xmlh )
- {
- xmlh. open ( 'post' , xmlpage , true ) ;
- xmlh. onreadystatechange = function ( x ) { if ( xmlh. readyState == 4 ) callback ( xmlh. responseText ) ; }
- xmlh. setRequestHeader ( "Accept-Charset" , "windows-1251" ) ;
- xmlh. setRequestHeader ( "Accept-Language" , "ru, en" ) ;
- xmlh. setRequestHeader ( "Connection" , "close" ) ;
- xmlh. setRequestHeader ( "Content-length" , data. length ) ;
- xmlh. setRequestHeader ( "Content-type" , "application / x-www-form-urlencoded" ) ;
- xmlh. send ( data ) ;
- }
- }
- < script type = "text / javascript" src = "js.js" > < / script >
- < style type = "text / css" >
- #autokey_out span {cursor: pointer; text-decoration: underline}
- < / style >
- < form id = "postForm" name = "form" method = "post" action = "#" target = "_self" >
- < textarea name = "content" rows = "16" cols = "60" tabindex = "2" > < / textarea >
- <Br />
- < input type = "text" name = "keywords" size = "60" value = "" >
- < input type = "submit" value = "Get Keywords" name = "autokey_keys" onclick = "javascript: SendPOST (); return false;" >
- <Br />
- < div id = "autokey_out" > < / div >
- < / form >
Source: https://habr.com/ru/post/56873/
All Articles