Auto Keyword Generator for your wap site pages!!!
PHP Code:
<?php
function keyword_extract($text){
$text = strtolower($text);
$punc =". , : ; ' ? ! ( ) \" \\";
$punc = explode(" ",$punc);
foreach($punc as $value){
$text = str_replace($value, " ", $text);
}
$commonWords ="about,that's,this,that,than,then,them,there,their,they,it's,with,which,were,where,whose,when,what,her's,he's,have";
$commonWords = strtolower($commonWords);
$words = explode(" ", $text);
$commonWords = explode(",", $commonWords);
foreach ($words as $value) {
$common = false;
if (strlen($value) > 3){
foreach($commonWords as $commonWord){
if ($commonWord == $value){
$common = true;
}
else{
}
}
if($common != true){
$keywords[] = $value;
}
else{
}
}
else{
}
}
$keywords = array_count_values($keywords);
arsort($keywords);
foreach ($keywords as $key => $value) {
if ($value > 3){
echo "<p><strong>" . ucfirst($key) . "</strong> is used <strong>" . $value . "</strong> times. </p>";
}
else{
}
}
}
//EXAMPLE REMOVE EXAMPLE REMOVE EXAMPLE REMOVE
$text = "mobile interactive community that can be access wherever you are in the world. It is made to connect people and to establish unity, camaraderie among peepholes";
$keywords = keyword_extract($text);
echo $keywords;
?>
Comment