- 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, Online, Parallax, Personal, Photography, Plugin, Portfolio, Product, Responsive, Simple, Slider, Social, Store, Template, Theme, Video, Woocommerce, Wordpress
Show all tags
Show all tags
- ThemeForest The Wedding Date Responsive Wedding HTML Template 19727160
- ThemeForest Olympus Responsive Coming Soon Template 19726941
- ThemeForest Leo Whale Responsive Prestashop 1.7 Theme 19647898
- ThemeForest Creativity Corporate HTML Template 19692452
- ThemeForest TaxiPark Taxi Service Company HTML5 Template 19724774
- ThemeForest Camembert Wine Restaurant & Cheese Shop PSD Template 19264865
- ThemeForest YESSHOP Drag & Drop Dynamic Responsive Shopify Theme Ultimate Fashion Supermarket Minimal 19726165
- ThemeForest Corazon Multi Concept Environment Charity Green Energy Nonprofit PSD Template 19535858
- ThemeForest Magnettheme Business One Page PSD Template 19587780
- ThemeForest Thebear Shopify Theme 19722868