kingpabel blog seo php library

SEO PHP Library

For search engine optimization we need some tools like as google pagerank,alexa pagerank etc.Fot that we need to use some tools or need to go some website for web study.In this article we will learn how to make that types of seo tools using seo php library.So lets start to learn.At first we need to require an dependency in our composer json.For require this follow the below code

Require Seo Php Library

Here i give you packagist url

And also github url

After require run composer install from you terminal.If you are not using composer.json file,you need to download this from github.

Make sure that you include bootstrap.php file in your project’s root index.php file.Like that

Require All Dependency With Project

After composer install you will find this dependency in your vendor folder.The folder structure will be


Now you have all the class for seotools and you can use which you need.For use follow this packagist github url.Here i give you some example.For use this seo php library i make wrapper class as my own way to simplify it.Let see how i made it.

Seo Php Library Wrapper Class

Here i describe it how can i do it.First i use a seo php library class that is SEOstats at the first line.Use is the technique of php namespace.Then i create a php class name Seo.Then create a public method name getAlexaRank($url) and send a url to this method.The method returns me alexa ranking.

Like that create a public method getGooglePageRank($url) and send a url to this method,this method return me google page rank.There is an message that google has not any official pageRank.This rank is depending on some analysis.

After that if you want to know google page speed,use this public method getGooglePageSpeed($url).To use google page rank you need to create an api from google.Click this URL to create a google page speed api.After creating api.Go to


this directory and use your api key.After that the getGooglePageSpeed($url) return you pagespeed information.

Let see how to use that wrapper class in a project.

Wrapper Class In a Project

Use can also get Google Websearch,Google SERP,SEOstats Mozscape,SEOstats Open Site Explorer (by MOZ) Methods,SEOstats SEMRush,SEMRush Graphs.

Also can get SEOstats Social Media Methods,Google+ PlusOnes,Facebook Interactions,Twitter Mentions information.

For more follow this Github URL.

So this is the technique to use seo php library in a php project.