Advertisement
Guest User

Untitled

a guest
Apr 12th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. $user= //Actual username;
  2. $password= //Actual Password
  3. $harvest_user = $user; // Harvest username, usually an email address
  4. $harvest_pass = $password; // Harvest password
  5. $harvest_account = $account;
  6.  
  7. require_once 'HarvestAPI.php';
  8.  
  9. spl_autoload_register(array('HarvestAPI', 'autoload') );
  10.  
  11. $harvestAPI = new HarvestAPI();
  12. $harvestAPI->setUser($harvest_user);
  13. $harvestAPI->setPassword($harvest_pass);
  14. $harvestAPI->setAccount($harvest_account);
  15.  
  16. $result = $harvestAPI->getUsers();
  17. // If Harvest returns successful
  18. if ($result->code == 200) {
  19. $people = $result->data;
  20. }
  21. else{
  22. echo "Not Successful";
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement