reverse_client_bg.php 601 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. * Gearman PHP Extension
  4. *
  5. * Copyright (C) 2008 James M. Luedke <contact@jamesluedke.com>,
  6. * Eric Day <eday@oddments.org>
  7. * All rights reserved.
  8. *
  9. * Use and distribution licensed under the PHP license. See
  10. * the LICENSE file in this directory for full text.
  11. */
  12. /* create our object */
  13. $gmclient= new GearmanClient();
  14. /* add the default server */
  15. $gmclient->addServer();
  16. /* run reverse client */
  17. $job_handle = $gmclient->doBackground("reverse", "this is a test");
  18. if ($gmclient->returnCode() != GEARMAN_SUCCESS)
  19. {
  20. echo "bad return code\n";
  21. exit;
  22. }
  23. exit;
  24. ?>