- Site Template
- WordPress Theme
- Blogging Theme
- CMS Theme
- Marketing Template
- eCommerce Theme
- Forum Theme
- Flash Template
- PSD Web Template
- .NET Script
- PHP Script
- HTML5 Code
- CSS Style
- Edge Animate Template
- Muse Template
- TypeEngine Theme
- Static Site Generator
- Sketch Template
CodeCanyon SEO Keyword Spy PHP Class 1517039
PHP Script \ Miscellaneous
Crawler \ Plugin \ Classes \ Website \ Keyword \ Keywords \ Analyzer
PHP Script - SEO Keyword Spy PHP Class 1517039 by lysis @ CodeCanyon
PHP Script \ Miscellaneous
Last Update: 20 February 12; Compatible Browsers: IE7, IE8, IE9, Firefox 2, Firefox 3, Firefox 4, Safari 4, Safari 5, Opera, Chrome; Software Version: PHP 5.x; Files Included: PHP.
Keywords and keyword density are common terms in SEO . You want to know your keywords and keyword density for your Web pages and your competitor pages. SEO Keyword Spy is a PHP class you can plug in to your programs that saves you time with keyword analysis functions. The tool even has a graph you can use to print out analysis and display it on the screen, or you can retrieve the keywords and use them in your own programs.
- Retrieve keyword phrases from a URL
- Get percentages (keyword density) for each keyword in the URL content
- Display a graph that shows the most common keywords and the keyword density or use the keyword density for your own program’s purposes
- Get plain text content you can use to store in a database
- Filter out common keywords you don’t need
- Customize the keywords you want to filter out using the stopwords.txt (some common words already included)
- Requires cURL
The demo link has a GUI for you to test it out, but all you need for installation is the “keywords” directory, which includes keywords.php, stopwords.txt and the HTML DOM component.
The project has the following structure.
| ¡ª| - keywords.php
| ¡ª| - stopwords.txt
| ¡ª| - (dir)htmldom
| ¡ª| - | - simple_html_dom.php
Copy the keywords directory to your project folder.
SEO Keyword Spy also uses cURL, so your server must have it installed. This class has been tested on PHP4 and PHP5 shared hosts.
How to Use the Class
After you copy the keywords directory to your project, you included it in your project. Add the following line of code to the PHP code file you want to use to retrieve the keywords.
Now, you can use the class. The first step is to instantiate the class. Add the following code to your PHP .
$content = new webkeywords();
Function: Get webpage content
This function is useful if you just want the content from the remote page. The following code retrieves the content in plain text.
$plaintext = $content->getContent($url);
Function: Get keyword density
This function returns the percentage for each keyword. All keywords are returned except those set up in the stopwords.txt file (more about this file later). The function returns an array of keywords. To retrieve the list of keywords and loop through each keyword and its density value, add the following code.
$stats = $content->getStatsOnly(); //gets a list of keywords and densities
foreach($stats as $key => $value) //displays keyword ($key) and the density ($value)
echo $key.”: ”.$value.”%
Function: Get the word count for the web page
This function just returns the word count for the page content. Add the following code to get the content.
$wordcount = $content->getWordCount();
Function: Graph the results
This function is optional, if you want to display a bar graph that represents the keyword density. You can only graph up to 20 keywords. The integer passed to to the function must be a number from 1 to 20. Add the following code to display a graph on your web page.
SEO Keyword Spy includes a text file you use to filter out words you don’t want to use. Some words are already added. The words must be contained in quotes, and separated by commas. You can add or delete keywords. The following is an example of the first line of the file.
“an”, “a”, “the”, “and”, “but”, “or”, “because”, “so”, “your”, “you”, “for”, “what”, “we”,
SEO Keyword Spy PHP Class.
Keywords: crawler, keyword analyzer, keywords, php, php classes, php plugin, seo, seo classes, seo php, seo plugin, web crawler, website crawler.
Android, Builder, Business, Clean, Corporate, Creative, Design, Ecommerce, Email, Fashion, Gallery, Image, Iphone, Jquery, Landing, Magazine, Magento, Marketing, Minimal, Mobile, Modern, Multi, Multipurpose, Parallax, Personal, Photography, Plugin, Portfolio, Product, Responsive, Retina, Simple, Slider, Social, Store, Template, Theme, Video, Woocommerce, Wordpress
Show all tags
Show all tags
- ThemeForest CoWork Open Office & Creative Space PSD Template 18401389
- ThemeForest Episode Responsive Multi-Purpose Portfolio Template 18078332
- ThemeForest Barrington Creative Agency HTML5 Template 18351230
- ThemeForest Riva Multipurpose Booking for Small Businesses 18179941
- ThemeForest Applan App Landing Page 18342101
- ThemeForest Carmen Car Dealership WordPress Theme 16266673
- ThemeForest Grayson A Stylish and Versatile Shop Theme 17794719
- ThemeForest Myna A Masonry WordPress Blog Theme 17345471
- ThemeForest Chronicle News and Magazine WordPress Theme 17299719
- ThemeForest Evont Event & Conference WordPress Theme 17497249