fork download
  1. <?php
  2.  
  3. $output = '{"Response":"<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"><soap:Body><LeadEntryResponse xmlns=\"http:\/\/www.abc.com\/\"><LeadEntryResult><AFFILIATES_LEAD xmlns=\"\"><STATUS><LEAD_STATUS>REJECTED<\/LEAD_STATUS><REMARK> LEAD ALREADY EXSITS - <\/REMARK><\/STATUS><\/AFFILIATES_LEAD><\/LeadEntryResult><\/LeadEntryResponse><\/soap:Body><\/soap:Envelope>"}';
  4. $key = 'LEAD ALREADY EXSITS';
  5. //CODE
  6. if (strpos($output,$key) !== false)
  7. {
  8.  
  9. echo "success";
  10. } else {
  11. echo "failure";
  12. }
Success #stdin #stdout 0.02s 24400KB
stdin
Standard input is empty
stdout
success