SoapClientNoBOM.php 567 B

1234567891011121314151617
  1. <?php
  2. namespace app\common;
  3. use SoapClient;
  4. class SoapClientNoBOM extends SoapClient
  5. {
  6. // public function __doRequest($request, $location, $action, $version, $one_way = 0)
  7. // {
  8. // $response = parent::__doRequest($request, $location, $action, $version, $one_way);
  9. // // strip away everything but the xml (including removal of BOM)
  10. // $response = preg_replace('#^.*(<\?xml.*>)[^>]*$#s', '$1', $response);
  11. // // also remove unit separator
  12. // $response = str_replace("\x1f", '', $response);
  13. // return $response;
  14. // }
  15. }