Tuesday, September 25, 2007
PHP Function: Keyword Extract
This is a great little php utility function is great for bloggers or for anyone looking to increase the keyword density on a site. The keyword extract function searches through a text string filtering out punctuation and common words to return a list of your most commonly used words. Links are then generated to search for these keyword possibilities on Google and to get keyword suggestions from Wordpot.
let's go deeply and explore this function:
so be happy and enjoy the script :)
download here
http://www.ziddu.com/download/3537305/keyword_extract.zip.html
let's go deeply and explore this function:
- download this zip file that contain the script.
- you can edit it with any PHP editor you want, for me i use notepad++ or PHP designer 2007.
- open the file with the editor:
- you will find a comment block telling you how to use this script. for us we will talk about how it works.
- the name of our function is "keyword_extract" it takes a variable $text that contain the text you want to extract keywords from it.
- First line is used to convert the text lowercase state.
- the 2 next lines declare a string that contain all punctuations and explode them using the explode function.
- a foreach loop used to replace each punctuation exploded before with a space character so it will not affect the result.
- declare a $commonWords variable that contain all the common words like "that,this,.." that we will not use in keywords.
- than a block of code used to compare the words available in the text to the common words if it's one of it it will not be counted and will be dumped. if it's not a common word it will be counted.
- each word that is counted more than 3 times, it will be used as a keyword, in the $keyword array.
- from line 89 to line 97:
- first line declare an array and give it array_count_values($keywords) that will take a count for each word in the keywords array.
- arsort($keywords): will sort the array with the index next to it. (count)
- foreach loop will output the result in a clear format. each keyword repeated more than 3 times, will be counted as keyword.
- the output give you the ability to show each keyword how much is repeated in GOOGLE and wordpot.
so be happy and enjoy the script :)
download here
http://www.ziddu.com/download/3537305/keyword_extract.zip.html
Tuesday, September 4, 2007
STATISTICS of developpers blog for AUGUST 2007
Hi again.
i will show you statistics from the birth of Developpers Blog (February 2007) till August.
This is the map overlay showing the visitors distribution around the world
i will show you statistics from the birth of Developpers Blog (February 2007) till August.
This is the map overlay showing the visitors distribution around the world
Subscribe to:
Posts (Atom)