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 : 3476  
 
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

Examine the 10 key PHP functions I use frequently

PHP never ceases to surprise me with its built-in capabilities. These are a few of the functions I find most fascinating.   1. Levenshtein This function uses the Levenshtein algorithm to calculate the…

How to Track Flight Status in real-time using the Flight Tracker API

The Flight Tracker API provides developers with the ability to access real-time flight status, which is extremely useful for integrating historical tracking or live queries of air traffic into your…

The Impact of Social Media Engagement on SEO Maximising Results with Link Building Agency

Our daily lives now include social media, and businesses have realised its potential for engaging and interacting with the target audiences. Social media not only makes it easier to communicate…

What is a JWT token and how does it work?

JWT tokens are a standard used to create application access tokens, enabling user authentication in web applications. Specifically, it follows the RFC 7519 standard. What is a JWT token A JWT token…

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…

Clicky