Beispiel #1
0
//
// For further reference see: https://github.com/eyecatchup/SEOstats/issues/49
// Bootstrap the library / register autoloader
#require_once realpath(__DIR__ . '/SEOstats/bootstrap.php');
require_once realpath(__DIR__ . '/vendor/autoload.php');
use SEOstats\Services\SemRush;
try {
    $url = 'http://www.google.de/';
    // Create a new SEOstats instance.
    $seostats = new \SEOstats\SEOstats();
    // Bind the URL to the current SEOstats instance.
    if ($seostats->setUrl($url)) {
        /**
         *  Get the current SEMrush DomainRank metrics for the given URL.
         */
        print_r(SemRush::getDomainRank());
        /**
         *  Get historical SEMrush DomainRank metrics for the given URL.
         */
        //print_r(SemRush::getDomainRankHistory());
        /**
         *  Get competing domains for the given URL
         *  and their basic SEMrush DomainRank metrics.
         */
        //print_r(SemRush::getCompetitors());
        /**
         *  Get organic search engine traffic data for the given URL.
         */
        //print_r(SEMrush::getOrganicKeywords());
        /**
         *  Get organic search engine traffic metrics for the given URL,