Search Engine Optimization with PHP

v3.1.8 2024-09-21 19:35 UTC

README

Latest Stable Version Total Downloads Daily Downloads Monthly Downloads License PHP Version Require

Search Engine Optimization Package

Version

  • V1.x, V2.x support all PHP version >=5.6
  • V3.x support all PHP version >=7.0

Usage

Một số hàm tiện ích dùng cho SEO Website

Get AddThis Script

<?php
echo add_this_script('add_this_id');

Get Facebook Comment Box

<?php
echo facebook_comments('url_comment');

Facebook Social

<?php
require_once __DIR__ . '/vendor/autoload.php';
$fb = new \nguyenanhung\SEO\Social\Facebook();
$fb->setAppId('1234')
           ->setAdminId('456')
           ->setRedirectUrl('https://nguyenanhung.com');

// FB Share Link
$data = $fb->createShareLink('link')->getLink();

// FB Share Count
$data = $fb->graphShare('link')->shareCount();

// FB Comment Count
$data = $fb->graphShare('link')->commentCount();

Google Plus

<?php
require_once __DIR__ . '/vendor/autoload.php';
$google = new \nguyenanhung\SEO\Social\GooglePlus();

// FB Share Link
$data = $google->createShareLink('link')->getLink();

Twitter

<?php
require_once __DIR__ . '/vendor/autoload.php';
$twitter = new \nguyenanhung\SEO\Social\Twitter();

// FB Share Link
$data = $twitter->createShareLink('link')->getLink();

Liên hệ

Nếu có bất cứ thông tin nào cần trao đổi và tìm hiểu, vui lòng liên hệ theo thông tin sau

From Hanoi with Love <3