Guest User

Untitled

a guest
Jul 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. $client = new Solarium_Client;
  4. $client->setHost('127.0.0.1');
  5. $client->setPort(8983);
  6. $client->setPath('/solr/');
  7. $client->setCore('core0');
  8.  
  9. $query = new Solarium_Query_Ping;
  10. $result = $client->ping($query);
  11.  
  12. // this will be 200 in case of a succesful ping
  13. echo $result->getStatus();
Add Comment
Please, Sign In to add comment