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

Source for file example.php

Documentation is available at example.php

  1. <?php
  2. //error_reporting(E_ALL|E_STRICT);
  3.  
  4. set_include_path(get_include_path(. PATH_SEPARATOR . dirname(__FILE__'/../');
  5.  
  6. require_once 'Services/ProjectHoneyPot.php';
  7.  
  8. /**
  9.  * config.php, includes:
  10.  * <?php $access_key = '...'; ?>
  11.  * 
  12.  * ... is the access key
  13.  */
  14. include dirname(__FILE__'/config.php';
  15.  
  16. try {
  17.     $sphp Services_ProjectHoneyPot::factory($access_key);
  18.  
  19.     //$ip = $_SERVER['REMOTE_ADDR'];
  20.     //$ip = '24.132.194.14';
  21.     //$ip = '62.75.159.212';
  22.     //$ip = 'heise.de';
  23.  
  24.     $status $sphp->query($harvester);
  25.  
  26. }
  27.     echo '<br />MSG: ' .$e->getMessage();
  28.     echo '<br />CODE: ' $e->getCode();
  29.     exit;
  30. }
  31. if ($status === false)
  32. {
  33.     echo 'Don\'t bother. Probably a regular user. ;-)';
  34.     exit;
  35. }
  36.  
  37. echo '<pre>'var_dump($status); echo '</pre>';
  38.  
  39. if (is_null($status['search_engine']=== true{
  40.     echo $sphp->getHoneyPot();
  41. }
  42. ?>

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