Skip to content

Commit

Permalink
Merge pull request #91 from tholu/semrush
Browse files Browse the repository at this point in the history
Fixed SEMRush to SemRush calls in Readme
  • Loading branch information
ClemensSahs committed Aug 4, 2014
2 parents 88ac686 + 987515e commit e64e08d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,38 +348,38 @@ More detailed examples can be found in the `./example` directory.
```php
<?php
// Returns an array containing the SEMRush main report (includes DomainRank, Traffic- & Ads-Data)
print_r ( SEMRush::getDomainRank() );
print_r ( SemRush::getDomainRank() );

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

// Returns an array containing data for competeing (auto-detected) websites.
print_r ( SEMRush::getCompetitors() );
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') );
print_r ( SemRush::getOrganicKeywords(0, 'de') );
```

### SEMRush Graphs

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

// Returns HTML code for the 'search engine traffic price'-graph.
print SEMRush::getDomainGraph(2);
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');
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);
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');
print SemRush::getDomainGraph(5, 0, 'de', 320, 240, '000000', 'ff0000');
```
<hr>

Expand Down
16 changes: 8 additions & 8 deletions example/get-semrush-graphs.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Stephan Schmitz <[email protected]>
* @copyright Copyright (c) 2010 - present Stephan Schmitz
* @license http://eyecatchup.mit-license.org/ MIT License
* @updated 2013/12/17
* @updated 2014/07/26
*/

// NOTE: The given path to the autoload.php assumes that you installed SEOstats via composer
Expand All @@ -24,10 +24,10 @@
#require_once realpath(__DIR__ . '/SEOstats/bootstrap.php');
require_once realpath(__DIR__ . '/vendor/autoload.php');

use \SEOstats\Services\SEMRush as SEMrush;
use \SEOstats\Services\SemRush;

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

// Create a new SEOstats instance.
$seostats = new \SEOstats\SEOstats;
Expand All @@ -38,33 +38,33 @@
/**
* Print HTML code for the 'search engine traffic'-graph.
*/
echo SEMrush::getDomainGraph(1);
echo SemRush::getDomainGraph(1);

/**
* Print HTML code for the 'search engine traffic price'-graph.
*/
echo SEMrush::getDomainGraph(2);
echo SemRush::getDomainGraph(2);

/**
* Print HTML code for the 'number of adwords ads'-graph,
* using explicitly SEMRush's data for google.de (german index).
*/
echo SEMrush::getDomainGraph(3, false, 'de');
echo SemRush::getDomainGraph(3, false, 'de');

/**
* Print HTML code for the 'adwords traffic'-graph, using
* explicitly SEMRush's data for google.de (german index)
* and specific graph dimensions of 320*240 px.
*/
echo SEMrush::getDomainGraph(4, false, 'de', 320, 240);
echo SemRush::getDomainGraph(4, false, 'de', 320, 240);

/**
* Print HTML code for the 'adwords traffic price'-graph,
* using explicitly SEMRush's data for google.de (german index),
* specific graph dimensions of 320*240 px and specific
* graph colors (black lines and red dots for data points).
*/
echo SEMrush::getDomainGraph(5, false, 'de', 320, 240, '000000', 'ff0000');
echo SemRush::getDomainGraph(5, false, 'de', 320, 240, '000000', 'ff0000');
}
}
catch (\Exception $e) {
Expand Down
16 changes: 8 additions & 8 deletions example/get-semrush-metrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Stephan Schmitz <[email protected]>
* @copyright Copyright (c) 2010 - present Stephan Schmitz
* @license http://eyecatchup.mit-license.org/ MIT License
* @updated 2013/12/17
* @updated 2014/07/26
*/

// NOTE: The given path to the autoload.php assumes that you installed SEOstats via composer
Expand All @@ -24,10 +24,10 @@
#require_once realpath(__DIR__ . '/SEOstats/bootstrap.php');
require_once realpath(__DIR__ . '/vendor/autoload.php');

use \SEOstats\Services\SEMRush as SEMrush;
use \SEOstats\Services\SemRush;

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

// Create a new SEOstats instance.
$seostats = new \SEOstats\SEOstats;
Expand All @@ -38,18 +38,18 @@
/**
* Get the current SEMrush DomainRank metrics for the given URL.
*/
print_r(SEMrush::getDomainRank());
print_r(SemRush::getDomainRank());

/**
* Get historical SEMrush DomainRank metrics for the given URL.
*/
//print_r(SEMrush::getDomainRankHistory());
//print_r(SemRush::getDomainRankHistory());

/**
* Get competing domains for the given URL
* and their basic SEMrush DomainRank metrics.
*/
//print_r(SEMrush::getCompetitors());
//print_r(SemRush::getCompetitors());

/**
* Get organic search engine traffic data for the given URL.
Expand All @@ -60,13 +60,13 @@
* Get organic search engine traffic metrics for the given URL,
* using explicitly SEMrush's data for google.de (german index).
*/
//print_r(SEMrush::getOrganicKeywords(false, 'de'));
//print_r(SemRush::getOrganicKeywords(false, 'de'));

/**
* Get an array containing explainations for the
* result keys of the DomainRank metric methods.
*/
//print_r(SEMrush::getParams());
//print_r(SemRush::getParams());
}
}
catch (\Exception $e) {
Expand Down

0 comments on commit e64e08d

Please sign in to comment.