Services_Compete
[ class tree: Services_Compete ] [ index: Services_Compete ] [ all elements ]

Source for file test_Services_Compete.php

Documentation is available at test_Services_Compete.php

  1. <?php
  2.  
  3. // PEAR.php seems to have a problem with E_STRICT
  4. error_reporting(E_ALL/* | E_STRICT*/);
  5.  
  6. require_once 'Services/Compete.php';
  7.  
  8. define('COMPETE_PERSONAL_KEY''(your_key)');
  9.  
  10. try {
  11.     $compete = new Services_Compete(COMPETE_PERSONAL_KEY);
  12.     $compete->query('mixi.jp');
  13.     
  14.     $result $compete->get();
  15.     
  16.     echo "domain: " $result->domain . "\n<br />";
  17.     echo "trust: " $result->trust->val . "\n<br />";
  18.     echo "rank: " $result->traffic->ranking . "\n<br />";
  19.     echo "visitors: " $result->traffic->count . "\n<br />";
  20.     var_dump($result);
  21.     
  22. catch (Services_Compete_Exception $ex{
  23.     echo 'Error: ' $ex->getMessage("\n";
  24. }
  25.  
  26. ?>

Documentation generated on Mon, 11 Mar 2019 14:44:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.