Giter Club home page Giter Club logo

seostats's Introduction

SEOstats: SEO metrics library for PHP

License Scrutinizer Code Quality Rating Build Status Scrutinizer Test Coverage Report Latest Stable Version Latest Unstable Version Monthly Downloads

SEOstats is the open source PHP library to get SEO-relevant website metrics.

SEOstats is used to gather metrics such as detailed searchindex & backlink data, keyword & traffic statistics, website trends, page authority, social visibility, Google Pagerank, Alexa Trafficrank and more.

It offers over 50 different methods to fetch data from sources like Alexa, Google, Mozscape (by Moz - f.k.a. Seomoz), SEMRush, Open-Site-Explorer, Sistrix, Facebook or Twitter.

A variety of (private as well as enterprise) SEO tools have been built using SEOstats.

Dependencies

SEOstats requires PHP version 5.3 or greater and the PHP5-CURL and PHP5-JSON extensions.

Installation

The recommended way to install SEOstats is through composer. To install SEOstats, just create the following composer.json file

{
    "require": {
        "seostats/seostats": "dev-master"
    }
}

and run the php composer.phar install (Windows: composer install) command in path of the composer.json.

Step-by-step example:

If you haven't installed composer yet, here's the easiest way to do so:

# Download the composer installer and execute it with PHP:
user@host:~/> curl -sS https://getcomposer.org/installer | php

# Copy composer.phar to where your local executables live:
user@host:~/> mv /path/given/by/composer-installer/composer.phar /usr/local/bin/composer.phar

# Alternatively: For ease of use, you can add an alias to your bash profile:
# (Note, you need to re-login your terminal for the change to take effect.)
user@host:~/> echo 'alias composer="php /usr/local/bin/composer.phar"' >> ~/.profile

If you have installed composer, follow these steps to install SEOstats: ``` # Create a new directory and cd into it: user@host:~/> mkdir /path/to/seostats && cd /path/to/seostats

Create the composer.json for SEOstats:

user@host:/path/to/seostats> echo '{"require":{"seostats/seostats":"dev-master"}}' > composer.json

Run the install command:

user@host:/path/to/seostats> composer install Loading composer repositories with package information Installing dependencies (including require-dev)

  • Installing seostats/seostats (dev-master 4c192e4) Cloning 4c192e43256c95741cf85d23ea2a0d59a77b7a9a

Writing lock file Generating autoload files

You're done. For a quick start, you can now

copy the example files to the install directory:

user@host:/path/to/seostats> cp ./vendor/seostats/seostats/example/*.php ./

Your SEOstats install directory should look like this now:

user@host:/path/to/seostats> ls -1 composer.json composer.lock get-alexa-graphs.php get-alexa-metrics.php get-google-pagerank.php get-google-pagespeed-analysis.php get-google-serps.php get-opensiteexplorer-metrics.php get-semrush-graphs.php get-semrush-metrics.php get-sistrix-visibilityindex.php get-social-metrics.php vendor

<hr>
#### Use SEOstats without composer

If composer is no option for you, you can still just download the [`SEOstats.zip`](https://github.com/eyecatchup/SEOstats/archive/master.zip) file of the current master branch (version 2.5.2) and extract it. However, currently [there is an issues with autoloading](https://github.com/eyecatchup/SEOstats/issues/49) and you need to follow the instructions in the comments in the example files in order to use SEOstats (or download zip for the development version of SEOstats (2.5.3) [here](https://github.com/eyecatchup/SEOstats/archive/dev-253.zip)).

## Usage

### TOC

* <a href='#configuration'>Configuration</a>
* <a href='#brief-example-of-use'>Brief Example of Use</a>
* <a href='#seostats-alexa-methods'>Alexa Methods</a>
 * <a href='#alexa-traffic-metrics'>Alexa Traffic Metrics</a>
 * <a href='#alexa-traffic-graphs'>Alexa Traffic Graphs</a>
* <a href='#seostats-google-methods'>Google Methods</a>
 * <a href='#google-toolbar-pagerank'>Toolbar Pagerank</a>
 * <a href='#google-pagespeed-service'>Pagespeed Service</a>
 * <a href='#google-websearch-index'>Websearch Index</a>
 * <a href='#google-serp-details'>SERP Details</a>
* <a href='#seostats-mozscape-methods'>Mozscape Methods</a>  
* <a href='#seostats-open-site-explorer-methods'>Open Site Explorer Methods</a>
* <a href='#seostats-semrush-methods'>SEMRush Methods</a>
 * <a href='#semrush-domain-reports'>Domain Reports</a>
 * <a href='#semrush-graphs'>Graphs</a>
* <a href='#seostats-sistrix-methods'>Sistrix Methods</a>
 * <a href='#sistrix-visibility-index'>Visibility Index</a>
* <a href='#seostats-social-media-methods'>Social Media Methods</a>

<hr>

### Configuration
There're two configuration files to note:
<ol>
<li>`./SEOstats/Config/ApiKeys.php`<br>
<em>Client API Keys (currently only required for Mozscape, Google's Pagespeed Service and Sistrix).</em>
</li>
<li>`./SEOstats/Config/DefaultSettings.php`<br>
<em>Some default settings for querying data (mainly locale related stuff).</em>
</li>
</ol>
<hr>

### Brief Example of Use
To use the SEOstats methods, you must include one of the Autoloader classes first (For composer installs: `./vendor/autoload.php`; for zip download: `./SEOstats/bootstrap.php`).

Now, you can create a new SEOstats instance an bind any URL to the instance for further use with any child class.

```php
<?php
// Depending on how you installed SEOstats
#require_once __DIR__ . DIRECTORY_SEPARATOR . 'SEOstats' . DIRECTORY_SEPARATOR . 'bootstrap.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

use \SEOstats\Services as SEOstats;

try {
  $url = 'http://www.google.com/';

  // Create a new SEOstats instance.
  $seostats = new \SEOstats\SEOstats;

  // Bind the URL to the current SEOstats instance.
  if ($seostats->setUrl($url)) {

	echo SEOstats\Alexa::getGlobalRank();
	echo SEOstats\Google::getPageRank();
  }
}
catch (SEOstatsException $e) {
  die($e->getMessage());
}

Alternatively, you can call all methods statically passing the URL to the methods directly.

<?php
// Depending on how you installed SEOstats
#require_once __DIR__ . DIRECTORY_SEPARATOR . 'SEOstats' . DIRECTORY_SEPARATOR . 'bootstrap.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

try {
  $url = 'http://www.google.com/';

  // Get the Google Toolbar Pagerank for the given URL.
  echo \SEOstats\Services\Google::getPageRank($url);
}
catch (SEOstatsException $e) {
  die($e->getMessage());
}

More detailed examples can be found in the ./example directory.


SEOstats Alexa Methods

Alexa Traffic Metrics

<?php
  // Returns the global Alexa Traffic Rank (last 3 months).
  print Alexa::getGlobalRank();

  // Returns the global Traffic Rank for the last month.
  print Alexa::getMonthlyRank();

  // Returns the global Traffic Rank for the last week.
  print Alexa::getWeeklyRank();

  // Returns the global Traffic Rank for yesterday.
  print Alexa::getDailyRank();

  // Returns the country-specific Alexa Traffic Rank.
  print_r( Alexa::getCountryRank() );

  // Returns Alexa's backlink count for the given domain.
  print Alexa::getBacklinkCount();

  // Returns Alexa's page load time info for the given domain.
  print Alexa::getPageLoadTime();

Alexa Traffic Graphs

<?php
  // Returns HTML code for the 'daily traffic trend'-graph.
  print Alexa::getTrafficGraph(1);

  // Returns HTML code for the 'daily pageviews (percent)'-graph.
  print Alexa::getTrafficGraph(2);

  // Returns HTML code for the 'daily pageviews per user'-graph.
  print Alexa::getTrafficGraph(3);

  // Returns HTML code for the 'time on site (in minutes)'-graph.
  print Alexa::getTrafficGraph(4);

  // Returns HTML code for the 'bounce rate (percent)'-graph.
  print Alexa::getTrafficGraph(5);

  // Returns HTML code for the 'search visits'-graph, using specific graph dimensions of 320*240 px.
  print Alexa::getTrafficGraph(6, 0, 320, 240);

SEOstats Google Methods

Google Toolbar PageRank

<?php
  //  Returns the Google PageRank for the given URL.
  print Google::getPageRank();

Google Pagespeed Service

<?php
  // Returns the Google Pagespeed analysis' metrics for the given URL.
  print_r( Google::getPagespeedAnalysis() );

  // Returns the Google Pagespeed analysis' total score.
  print Google::getPagespeedScore();

Google Websearch Index

<?php
  // Returns the total amount of results for a Google site-search for the object URL.
  print Google::getSiteindexTotal();

  // Returns the total amount of results for a Google link-search for the object URL.
  print Google::getBacklinksTotal();

  // Returns the total amount of results for a Google search for 'keyword'.
  print Google::getSearchResultsTotal('keyword');

Google SERP Details

<?php
  // Returns an array of URLs and titles for the first 100 results for a Google web search for 'keyword'.
  print_r ( Google::getSerps('keyword') );

  // Returns an array of URLs and titles for the first 200 results for a Google site-search for $url.
  print_r ( Google::getSerps("site:$url", 200) );

  // Returns an array of URLs, titles and position in SERPS for occurrences of $url
  // within the first 1000 results for a Google web search for 'keyword'.
  print_r ( Google::getSerps('keyword', 1000, $url) );

SEOstats Mozscape Methods

<?php
  // The normalized 10-point MozRank score of the URL. 
  print Mozscape::getMozRank();
  
  // The raw MozRank score of the URL.
  print Mozscape::getMozRankRaw();
  
  // The number of links (equity or nonequity or not, internal or external) to the URL.
  print Mozscape::getLinkCount();
  
  // The number of external equity links to the URL (http://apiwiki.moz.com/glossary#equity).
  print Mozscape::getEquityLinkCount();
  
  // A normalized 100-point score representing the likelihood
  // of the URL to rank well in search engine results.  
  print Mozscape::getPageAuthority();
  
  // A normalized 100-point score representing the likelihood
  // of the root domain of the URL to rank well in search engine results.
  print Mozscape::getDomainAuthority();

SEOstats Open Site Explorer (by MOZ) Methods

<?php
  // Returns several metrics from Open Site Explorer (by MOZ)
  $ose = OpenSiteExplorer::getPageMetrics();

  // MOZ Domain-Authority Rank - Predicts this domain's ranking potential in the search engines 
  // based on an algorithmic combination of all link metrics.
  print "Domain-Authority:         " .
        $ose->domainAuthority->result . ' (' .      // Int - e.g 42
        $ose->domainAuthority->unit   . ') - ' .    // String - "/100"
        $ose->domainAuthority->descr  . PHP_EOL;    // String - Result value description

  // MOZ Page-Authority Rank - Predicts this page's ranking potential in the search engines 
  // based on an algorithmic combination of all link metrics.
  print "Page-Authority:           " .
        $ose->pageAuthority->result . ' (' .        // Int - e.g 48
        $ose->pageAuthority->unit   . ') - ' .      // String - "/100"
        $ose->pageAuthority->descr  . PHP_EOL;      // String - Result value description

  // Just-Discovered Inbound Links - Number of links to this page found over the past %n days, 
  // indexed within an hour of being shared on Twitter.
  print "Just-Discovered Links:    " .
        $ose->justDiscovered->result . ' (' .       // Int - e.g 140
        $ose->justDiscovered->unit   . ') - ' .     // String - e.g "32 days"
        $ose->justDiscovered->descr  . PHP_EOL;     // String - Result value description

  // Root-Domain Inbound Links - Number of unique root domains (e.g., *.example.com) 
  // containing at least one linking page to this URL.
  print "Linking Root Domains:     " .
        $ose->linkingRootDomains->result . ' (' .   // Int - e.g 210
        $ose->linkingRootDomains->unit   . ') - ' . // String - "Root Domains"
        $ose->linkingRootDomains->descr  . PHP_EOL; // String - Result value description

  // Total Links - All links to this page including internal, external, followed, and nofollowed.
  print "Total Links:              " .
        $ose->totalLinks->result . ' (' .           // Int - e.g 31571
        $ose->totalLinks->unit   . ') - ' .         // String - "Total Links"
        $ose->totalLinks->descr  . PHP_EOL;         // String - Result value description

SEOstats SEMRush Methods

SEMRush Domain Reports

<?php
  // Returns an array containing the SEMRush main report (includes DomainRank, Traffic- & Ads-Data)
  print_r ( SemRush::getDomainRank() );

  // Returns an array containing the domain rank history.
  print_r ( SemRush::getDomainRankHistory() );

  // Returns an array containing data for competeing (auto-detected) websites.
  print_r ( SemRush::getCompetitors() );

  // Returns an array containing data about organic search engine traffic, using explicitly SEMRush's german database.
  print_r ( SemRush::getOrganicKeywords(0, 'de') );

SEMRush Graphs

<?php
  // Returns HTML code for the 'search engine traffic'-graph.
  print SemRush::getDomainGraph(1);

  // Returns HTML code for the 'search engine traffic price'-graph.
  print SemRush::getDomainGraph(2);

  // Returns HTML code for the 'number of adwords ads'-graph, using explicitly SEMRush's german database.
  print SemRush::getDomainGraph(3, 0, 'de');

  // Returns HTML code for the 'adwords traffic'-graph, using explicitly SEMRush's german database and
  // specific graph dimensions of 320*240 px.
  print SemRush::getDomainGraph(4, 0, 'de', 320, 240);

  // Returns HTML code for the 'adwords traffic price '-graph, using explicitly SEMRush's german database,
  // specific graph dimensions of 320*240 px and specific graph colors (black lines and red dots for data points).
  print SemRush::getDomainGraph(5, 0, 'de', 320, 240, '000000', 'ff0000');

SEOstats Sistrix Methods

Sistrix Visibility Index

<?php
  // Returns the Sistrix visibility index
  // @link http://www.sistrix.com/blog/870-sistrix-visibilityindex.html
  print Sistrix::getVisibilityIndex();

SEOstats Social Media Methods

Google+ PlusOnes

<?php
  // Returns integer PlusOne count
  print Social::getGooglePlusShares();

Facebook Interactions

<?php
  // Returns an array of total counts for overall Facebook interactions count, shares, likes, comments and clicks.
  print_r ( Social::getFacebookShares() );

Twitter Mentions

<?php
  // Returns integer tweet count for URL mentions
  print Social::getTwitterShares();

Other Shares

<?php
  // Returns the total count of URL shares via Delicious
  print Social::getDeliciousShares();

  // Returns array of top ten delicious tags for a URL
  print_r ( Social::getDeliciousTopTags() );

  // Returns the total count of URL shares via Digg
  print Social::getDiggShares();

  // Returns the total count of URL shares via LinkedIn
  print Social::getLinkedInShares();

  // Returns shares, comments, clicks and reach for the given URL via Xing
  print_r( Social::getXingShares() );

  // Returns the total count of URL shares via Pinterest
  print Social::getPinterestShares();

  // Returns the total count of URL shares via StumbleUpon
  print Social::getStumbleUponShares();

  // Returns the total count of URL shares via VKontakte
  print Social::getVKontakteShares();

License

(c) 2010 - 2016, Stephan Schmitz [email protected]
License: MIT, http://eyecatchup.mit-license.org
URL: https://eyecatchup.github.io

seostats's People

Contributors

alexandermeindl avatar barryvdh avatar carlwhittick avatar clemenssahs avatar eyecatchup avatar florentcm avatar francisbesset avatar iamdual avatar ijanki avatar jamesspittal avatar mhammerschmidt avatar nabikaz avatar silvantonio avatar tholu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seostats's Issues

SEOmoze with API

Hello , I find this plugin very useful, but can you tell me how can I configure it with the open site explorer (seomoze) using API key , free as well as a premium account key , actually m not getting that code will you tell me ?

PageSpeed API problem

Caught SEOstatsException: In order to use the PageSpeed API, you must obtain and set an API key first (see SEOstats\Config\ApiKeys.php).

getMessage(); }

Pagerank check - 'Failed to generate a valid hash for PR check.' for PR N/A

Just came across SEOstats and it looks like it will be a godsend to me! Testing out the PR Checker and it seems like whenever a page has a N/A pagerank I am getting the error 'Failed to generate a valid hash for PR check.'.

Not a big issue as it is returning the correct PR if a page has one but thought you might want to know.

Facebook API Certificate Problem

Whenever I try to do the seostats.facebook.getFacebookShares method, CURL throws an error

SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Steps to Reproduction:

Run file:

Facebook_Mentions_Total(); ?>

I fixed this by changing the cURL($url) method from:

        curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,1);
        curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,1);

to

        curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
        curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);

However, I was not sure if this would break any other APIs that use https.

Google Pagespeed Improvements suggested by Bryan McQuade

The guy in charge for the PageSpeed Service at Google, Bryan McQuade, made a few suggestions:

  1. Developers can send a smaller number of queries without getting an API key. So it would be totally reasonable to set it up such that if they haven't set the key, it sends the request without a key. That would make it easier for users to start getting PageSpeed data without any special configuration. If they want a dedicated quota they would need to get an API key for that. This is what we generally recommend as it makes it easier for users to start using the service to see if it is of value to them.
  2. You can also specify a 'strategy' key in the API url with values strategy=desktop or strategy=mobile to analyze the desktop or mobile versions of a page. As mobile becomes more prevalent it is becoming more important to focus on it. The default, if no 'strategy' parameter is set, is to analyze the desktop version of a page.
  3. If you add the screenshot=true parameter to the API URL you'll get a base64-encoded screenshot of the page that was analyzed. This can be a nice thing to show in the UI of the tool. You may have to post process the base64 screenshot slightly to get it to show up in the UI. Let me know if you are interseted in this and I can send you some code for it.

Will be implemented in the next version.

Fatal Error

Fatal error: Class 'SEOstats\Services\SEMRush' not found

from this line:

print_r(SEMrush::getDomainRank());

How to call googleArray (search results) method?

I'm aware of the challenges with programatically getting human-like search results, but i have a support question before that:

If SEOStats requires a URL when instantiated, but googleArray() needs only a query (search phrase) and then calls SEOStats with a URL, how do we get a search result array without needlessly passing a dummy URL?

refactoring

moin from hamburg,

I analyst your project a little and I'm wondering about your technic solution. One of them is the frequency of static feature of PHP. I don't want expose anyone, my reason are a technical discussion to make this project better. If my thread have not this result, I'm very sorry.

  1. Static Variable, we need this really? This looks like bad design.
  2. Services class extends the SEOstats class? What logical reason have this?
  3. One Service Class for multiple Services
  4. Better Exception Classes:
    • Master Exception Interface "SEOstats\Exception\Exception"
    • "SEOstats\Exception\GoogleApiKeyNotSetException"
    • "SEOstats\Exception\MozscapeAccessIdNotSetException"
    • etc.
  5. Copy & Parste from code in:
  6. SemRush can use guardmethod to resolve the dopplicate code

What are your opinion to this points? thanks for Feedback.

Google SERPS is not working

I am still getting Array(). I just install the last version and this is my code (from the example file)

getMessage(); }

PHP Warning: Unexpected character in input:

Hello ,

When i used it on localhost it works perfactly fine but when I move the same SEOstats-master directory to my server it give me following error in the errorlog file and the browser page becomes blank.

PHP Warning: Unexpected character in input: '' (ASCII=92) state=1 in /home/abctest/public_html/example.net/SEOstats-master/example/get-alexa-graphs.php on line 15

Can anyone help ??

SEOMoz Data not working (patch included)

SEO Moz data has not worked correctly for about a month. I believe SEO Moz now requires a "Cols" parameter. (see: http://apiwiki.seomoz.org/url-metrics)

This should be the new Seomoz_Authority function:

public static function Seomoz_Authority($uri)
{
    // external helper class
    include_once ('ext/SeoMoz/Authenticator.php');

    $authenticator = new Authenticator();
    $url = urlencode($uri);

    $tmp = SEOstats::cURL('http://lsapi.seomoz.com/linkscape/url-metrics/'.$url.'?'.$authenticator->getAuthenticationStr().'&Cols=103079266336');
    $data = json_decode($tmp);

    $result = array('URL Authority'     => $data->upa, //34359738368
                    'URL mozRank'       => $data->umrp, //16384
                    'Domain Authority'  => $data->pda, //68719476736
                    'Domain mozRank'    => $data->fmrp, //32768
                    'External Links'    => $data->ueid, //32
                    'Total Links'       => $data->uid //2048
                    );
    return $result;
}

SEOstats Alexa fails to return Global Rank

Hi,
The Alexa module is not returning the main metrics reporting that all ranks are n.a.
Global Rank (quarterly): n.a.
Global Rank (monthly): n.a.
Global Rank (weekly): n.a.
Global Rank (daily): n.a.
At the same time it returns the following metrics:
Country Rank:
Total Backlinks:
Page load time:
I've tried it on 4 different servers to rule out my own issues, I've also tested close to 100 urls that I know for sure will have an Alexa rank within 1million.

Has anyone experienced the same issue? Is there a solution for this?
Thanks.

Why are there no more MajesticSEO methods?

I was asked several times what happened to the MajesticSEO sub-module. Short answer: I removed it as of request per MajesticSEO's CEO. His Email with some more detailed reasons can be found below. Hope this answers the question. Cheers.

Hello,

I am writing to you because you are listed as author of software called
SEOstats that we believe was used today to conduct a DDoS attack on our site
majesticseo.com with millions of requests generated over very short period
of time. This caused downtime on our end and our team was forced to work on
weekend - and further work will be required in order to prevent this from
happening again.

Due to this attack we have had to restrict access to our data from thousands
of internet users who have come to appreciatte our site explorer tool.

We are currently taking steps to identify actual attackers who appear to
have used your software and may take appropriate legal action, however given
that they appear to have used your software it seemed logical to send you an
email as well.

I'd like to inform you that in addition to your software apparently being
used in large scale attack on our site, it also uses an unauthorised method
to obtain data from our site that is expressly forbidden by our Terms and
Conditions of service, specifically: "Users are not permitted to query the
Majestic-12 database or servers using any automated tools without getting
prior written permission from us to do so." Source:
https://www.majesticseo.com/support/terms

The software that you have written violates our terms because it is not a
recognised search engine and it does not use approved API and we have never
given you written permission to obtain data the way you've implemented. The
reason I mention it is because there is a possibility that attackers might
claim that they have merely used your software assuming that you had
permission to run such queries against our database. For the avoidance of
any doubt I'd like to state categorically that you DID NOT and DO NOT have
any such permission.

As we continue to investigate this attack we might be forced in near future
to contact you again asking to provide all details (such as list of IP
addresses) you may have on those who've downloaded your software in order to
help us trace actual attackers.

I would appreciate if you could get back to us as soon as possible - we have
suffered real losses today and we intend to take determined effort to ensure
this does not happen again.

We do not know if other providers of SEO information have been affected by
similar attacks over the weekend. You may consider, however, if it is
appropriatte for software which enables unauthorised use of remote computer
systems to continue to be freely available whilst you consider your reponse.


Best regards,

Alex Chudnovsky
Managing Director

Email :  [strip]
Web   :  http://www.majesticseo.com

Majestic-12 Ltd (t/a Majestic-SEO)
Faraday Wharf, Holt Street
Birmingham Science Park, Aston
Birmingham, B7 4BB

Another official comment can be found here: #1

invalid object

I downloaded this script which sounds amazing and I installed it on my local xampp server but I keep getting this error
"Notice: Undefined index: http://www.google.com in C:\xampp\htdocs\xampp\seo\examples\example-1.php on line 7
Invalid Object > Requires an URL."
I am sure i am making some stupid mistake but it will be great if some one can help me with this
Regards
Nik

Google Index is not working

Hey there,

I recently noticed that there is a problem with the "getSiteindexTotal". When I check: "site:mydomain.com" Google returns 77 results. When I put the same domain on SEOstats->getSiteindexTotal it returns 0 or 1 (depends if I add "www." or not).

Maybe it's because of the "deprecated" Google API ?

Data collection from social Google plus stopped working

I change the methode to get data from google plufus to :
public static function getGooglePlusShares($url = false)
{
$url = parent::getUrl($url);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://clients6.google.com/rpc");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
$curl_results = curl_exec ($curl);
curl_close ($curl);
$json = json_decode($curl_results, true);
return intval( $json[0]['result']['metadata']['globalCounts']['count'] );

}

Google PR works incorrect

When I'm trying to get Page Rank of one of the site pages, it returns page rank of domain.
For example, PR of the http://twitter.com/vnua is 2, but the following code will return PR of the http://twitter.com page, which is equal to 10:

$url = new SEOstats("http://twitter.com/vnua");
$pr = $url->Google_Page_Rank(); // Will return 10, instead of 2.

google pagerank full pathnames not working

For example, if you use:

$url = new SEOstats('http://www.theonion.com/');
$url->print_array('Google_Page_Rank');

You'll get a '7'.

$url = new SEOstats('http://www.theonion.com/articles/new-breeding-program-aimed-at-keeping-moderate-rep,27371/');
$url->print_array('Google_Page_Rank');

will also give a 7, although it should give a "0".

Help with installation without Composer

I have read the notes about problems installing SEOstats without composer but I am stuck with the instructions in particular the DIRECTORY_SEPARATOR part. I don't have SSH access on my hosting. I think this script is great, I just can't figure out how to install. I know the basics of PHP and have used plenty of scripts before, so I am intrigued as to why this script is a bit difficult to install. I'm using https://github.com/eyecatchup/SEOstats/archive/dev-253.zip

Any help would be greatly appreciated.

Fix Autoloader (i.e. failed requires) - Read before file a bug report for failed requires!

LAST EDITED 2013-12-16

Okay. First, there were some cross-platform path name seperator issues ("" instead of "/"), which resulted in many users experienced failed requires. On the other hand, there were some composer users having issues with my custom PSR-0 Autoloader class.

Because these issues existed for some time and I still had no time to fix it myself, I merged #41 and #42. These commits (thanks to @francisbesset) fix both issues by using the PHP constant DIRECTORY_SEPARATOR as a path name seperator and replacing the custom Autoloader class by composer's.

However, this breaks autoloading without composer for the current master branch. I will merge back the custom PSR-0 Autoloader class for alternative use with the upcoming 2.5.3 release.

If you have issues with failed requires, for the moment the best way is to use composer to install SEOstats (as referenced here). The alternative way, downloading the Zip-File from Github does not work! If there's no way for you to work with composer, you can still download the Zip-File of the Dev-Version of 2.5.3 here: https://github.com/eyecatchup/SEOstats/archive/dev-253.zip . This still includes the "old" custom Autoloader class for you to use the examples out of the box. However, you need to change the back slashes ("") - used in the example files to require the autoloader class - with the DIRECTORY_SEPARATOR constant (see this comment for more detailed instructions).

Wrong path reference to composer's autoload.php in example files

Merge #42 broke the path references to composer's autoload.php in the example. (cross-reference: #49 (comment)).

C:\xampp\htdocs\seostats-master-20131203>diff get-google-pagerank.php vendor\seostats\seostats\example\get-google-pagerank.php
13c13
< require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

---
> require_once __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php';

Class not found

In the get-semrush-metrics.php example I get the following error:

Fatal error: Class 'SEOstats\Services\SEMRush' not found

Note: To get the code past a fatal error on the require_once, I had to change it to this:
require_once ($_SERVER['DOCUMENT_ROOT'] . '/SEOstats/bootstrap.php');

Also, very new PHP namespaces and use statements. My version of Dreamweaver flags them as incorrect syntax.

PHP Fatal error: require_once(): Failed opening

Hello,
when i load SEOstats-master folder on my server and try to open an example (ex: get-alexa-metrics.php) the page on browser are blank and in the error_log file on server i see:

[Mon Oct 28 15:24:11 2013] [warn] [client 235.103.171.90] mod_fcgid: stderr: PHP Fatal error: require_once(): Failed opening required '/var/www/vhosts/mysite.net/httpdocs/test/SEOstats-master/example..\SEOstats\bootstrap.php' (include_path='.:') in /var/www/vhosts/mysite.net/httpdocs/test/SEOstats-master/example/get-alexa-metrics.php on line 13

Thanks

php class Not found

Fatal error: Class 'SEOstats' not found in Path/SEO/seostats.google.php on line 27

I have tried to add

include_once('class.seostats.php');

all pages become blank :(
any solution please

SEOstats Pagerank Recently Returns All Fail to ...

I used to SEOstats to get google pagerank. It works great before. But recently during the day, it returns "Failed to generate a valid hash for PR check." for all the urls. For example, this morning it works fine, but now it doesn't work again. Not stable.

Any idea?

Alexa issue

Alexa is not giving any data anymore. I think they have closed there server for external scripts like php files. How can we get around this issue? They also don't have a good api to find also country data etc.

I'm using your script for www.websitepepper.com and the alexa ranking is essential for the score. Can you please help me with this issue?

Thanks!

Failed opening required in bootstrap.php (AutoLoader.php)

I install seostats by composer and i first require bootstrap.php file by require_once (__DIR__ . '/../vendor/seostats/seostats') . '/SEOstats/bootstrap.php'; and then use it normally. If I don't require bootstrap.php file i get error Use of undefined constant SEOSTATSPATH - assumed 'SEOSTATSPATH'. If I require bootstrap file i get "Failed opening required" error.

So i Think the code listed below should be removed from: /vendor/seostats/seostats/SEOstats/bootstrap.php because /Common/AutoLoader.php file no longer exist.

/*
 *---------------------------------------------------------------
 *  Register autoloader
 *---------------------------------------------------------------
 */

require_once SEOSTATSPATH . '/Common/AutoLoader.php';

$autoloader = new \SEOstats\Common\AutoLoader(__NAMESPACE__, dirname(__DIR__));

$autoloader->register();

This problem occurs today when I run composer update.

Issues with googleArray

Hey,
I've issues with making external calls to google via googleArray. it fails with an exception.

I found a solution which would replace the /custom to /cse which solves the issue.

Regards,
Oleg.

Alexa issue on localhost

Notice: Trying to get property of non-object in C:\xampp\htdocs\whois\SEO\src\modules\seostats.alexa.php on line 71

Notice: Trying to get property of non-object in C:\xampp\htdocs\whois\SEO\src\modules\seostats.opensiteexplorer.php on line 27

Notice: Trying to get property of non-object in C:\xampp\htdocs\whois\SEO\src\modules\seostats.opensiteexplorer.php on line 28

Notice: Trying to get property of non-object in C:\xampp\htdocs\whois\SEO\src\modules\seostats.opensiteexplorer.php on line 29

Notice: Trying to get property of non-object in C:\xampp\htdocs\whois\SEO\src\modules\seostats.opensiteexplorer.php on line 30

Notice: Undefined offset: 0 in C:\xampp\htdocs\whois\SEO\src\modules\seostats.semrush.php on line 85

And...
Country-specific Domain-Rank
Warning: Illegal string offset 'rank' in C:\xampp\htdocs\whois\SEO\demo\index.php on line 42
N (Rank in
Warning: Illegal string offset 'country' in C:\xampp\htdocs\whois\SEO\demo\index.php on line 42
N)

How to Use it with codeigniter ?

Hello, this is a great library , but I am not able to use this one in codeigniter , can anyone help me regarding this ?

Thanks,

Undefined offset: 1 in getTbrTldSuggestion() and "Failed to generate a valid hash for PR check" when check PR

Until today it works good, but now i get this error when check Page Rank
'ErrorException' with message 'Undefined offset: 1' in /vendor/seostats/seostats/SEOstats/Services/3rdparty/GTB_PageRank.php:198

I check this and sometimes it's return array(1) { [0]=> string(0) "" } so index 1 not exist.

so I change it to:

  public function getTbrTldSuggestion() {
    $tmp = explode(".google.", GTB_Request::_get(tbr::SUGGEST_TLD_URL));
    return isset($tmp[1]) ? trim($tmp[1]) : 'com';
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.