SEO from Php with PhpSEO class in PHP

SEO from Php with PhpSEO class in PHP
by Janeth Kent Date: 29-05-2013 seo php class


 

Here we present a class to make better SEO in your PHP.

I want to post about SEO functions and classes for PHP and this is my first post about it. Let me show a demonstration of PhpSEO.

Basic usage:

$seo = new phpSEO("some long text here");
$keywords = $seo->getKeyWords();
$desc = $seo->getMetaDescription();

Advance usage:

$seo = new phpSEO("some long text here");
$keywords = $seo->getKeyWords(5);//returns only 5 keys
$desc = $seo->getMetaDescription(100);//returns 100 chars

Expert mode:

seo = new phpSEO();
$seo->setText(file_get_contents("http://neo22s.com"));//reading content form file or url
echo $seo->getText();//prints the text
$seo->setDescriptionLen(150);//description 150 chars
echo $seo->getMetaDescription();//print description
$seo->setBannedWords("sed,non,libero");//banned words, override the existing ones for keywords
$seo->setMaxKeywords(10);//sets 10 the max keywords
$seo->setMinWordLen(5);//all the words with len less than 5 will be erased
echo $seo->getKeyWords();//returns the keys

The phpSEO class download.

 
by Janeth Kent Date: 29-05-2013 seo php class hits : 3017  
 
Janeth Kent

Janeth Kent

Licenciada en Bellas Artes y programadora por pasión. Cuando tengo un rato retoco fotos, edito vídeos y diseño cosas. El resto del tiempo escribo en MA-NO WEB DESIGN AND DEVELOPMENT.

 
 
 

Related Posts

PHP - The Singleton Pattern

The Singleton Pattern is one of the GoF (Gang of Four) Patterns. This particular pattern provides a method for limiting the number of instances of an object to just one.…

How to Send Email from an HTML Contact Form

In today’s article we will write about how to make a working form that upon hitting that submit button will be functional and send the email (to you as a…

Use the SRCSET attribute to improve your SEO

There is a new standard HTML attribute that can be used in conjunction with IMG called SRCSET. It is new and important as it allows webmasters to display different images…

SEO: How to choose the best Anchor Text

Anchor Text are the words used to insert a link within a piece of content. This text can be anything from "click here" to the name of a brand or…

Cumulative Layout Shift, what is and How to optimize CLS

Cumulative Layout Shift, one of the new Core Web Vitals metrics,  is the first metric that focuses on user experience beyond performance. Unexpected movement of web page content is a major…

Understanding LCP, CLS, FID. All about Core Web Vitals in Google Search Console

A few months ago we talked about certain Google metrics that were displayed in Search Console. The reason for writing another post on this topic is that Google has changed…

The State of PHP 8: new features and changes

PHP 8.0 has been released last November 26: let's discover together the main innovations that the new version introduces in this language. PHP is one of the most popular programming languages…

The best free tools for linkbuilding

Linkbuilding is one of the main factors in improving the SEO positioning of a page. Having a profile of inbound links from pages with great authority can mean the difference…

SEO: How to find and remove artificial links

At Ma-no we are aware of the importance of a good linkbuilding strategy in order to achieve success with a website. Links are key to placing a website among the top…

5 Tips to Bring More Traffic to Your Blog

Publishing a blog on your business website is an effective marketing tool for several reasons. Blog posts are the ideal place to share information about your company, products, services, and showcase…

How to Deal with Unnatural Inbound Links

A website that has a good rank on search engines, especially Google is a big task. Backlinks or Inbound links are one of the best ways to achieve this ranking.…

HTTP Cookies: how they work and how to use them

Today we are going to write about the way to store data in a browser, why websites use cookies and how they work in detail. Continue reading to find out how…

We use our own and third-party cookies to improve our services, compile statistical information and analyze your browsing habits. This allows us to personalize the content we offer and to show you advertisements related to your preferences. By clicking "Accept all" you agree to the storage of cookies on your device to improve website navigation, analyse traffic and assist our marketing activities. You can also select "System Cookies Only" to accept only the cookies required for the website to function, or you can select the cookies you wish to activate by clicking on "settings".

Accept All Only sistem cookies Configuration