African Centre for Advanced Studies in Management (CESAG)
$search = array(' with ', ' and ', ' the ', ' there ', ' their ', ' they\'re ', ' are ', ' to ', ' when ', ' on ', ' by ', ' you ',' ','.','','"',';',':','}','{','[',']','|','\\','/','=','+','-','_',')','(','*','&','^','%','$','#','@','!','~','`');
$search = explode("\n", str_replace(array("\R\n", "\n\r", "\n\n", "\n\n\n"), "\n", file_get_contents(__DIR__ . "/search-replace.txt")));
with
and
the
there
their
they\'re
are
to
when
on
by
you
.
,
"
'
;
:
<
>
}
{
[
]
|
\
/
=
+
-
_
)
(
*
&
^
%
$
#
@
!
~
`
$minimumwordlen = 3;
// Gets Meta Data
$path = str_replace($search, ',', str_replace(basename($_SERVER['REQUEST_URI']), '', $_SERVER['REQUEST_URI']));
$sitename = htmlspecialchars_decode($this->_tpl_vars['xoops_sitename']);
$slogon = htmlspecialchars_decode($this->_tpl_vars['xoops_slogan']);
$pagetitle = htmlspecialchars_decode($this->_tpl_vars['xoops_pagetitle']);
$keywords = htmlspecialchars_decode($this->_tpl_vars['xoops_meta_keywords']);
$description = htmlspecialchars_decode($this->_tpl_vars['xoops_meta_description']);
// Makes Unique Keyword Sentence with NO KEYPHRASES - A KEY PHRASE IS AN INCORRECT USE OF THE META TAG 'KEYWORDS' that is singlar words a KEYWORD not a sentence or phrase
$nophrase = str_replace($search, ',', $path.str_replace($search, ',', $sitename).','.str_replace($search, ',', $slogon).','.str_replace($search, ',', $pagetitle).','.str_replace($search, ',', $keywords).','.str_replace($search, ',', $description));
$keywords = array_unique(explode(',', $nophrase));
foreach($keywords as $id => $word) {
if (strlen($word)<$minimumwordlen||is_numeric($word)) {
unset($keywords[$id]);
}
}
echo implode(', ', $keywords);<{/php}>" />