Guest User

Untitled

a guest
Sep 29th, 2017
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. <?php
  2.  
  3. class readZP400
  4. {
  5.     public $soapUri = "http://websrv.bzp.uzp.gov.pl/BZP_PublicWebService.asmx?wsdl";
  6.    
  7.     public function readJSON()
  8.     {
  9.  
  10.         $soapClient = new \SoapClient($this->soapUri, array(
  11.             'exceptions' => true,
  12.             "trace" => 1
  13.         ));
  14.  
  15.         try {
  16.             $ap_param = new class()
  17.             {
  18.                 public $_rodzaj_zamawiajacego = 99;
  19.                 public $_rodzaj_zamowienia = 99;
  20.                 public $_tryb_udzielenia_zamowienia = 99;
  21.                 public $_data_publikacjiOd = '2017-09-06';
  22.                 public $_data_publikacjiDo = '2017-09-07';
  23.                 public $_czyGrupaCPV = 0;
  24.                 public $_calkowita_wart_zam_od = -1;
  25.                 public $_calkowita_wart_zam_do = -1;
  26.             };
  27.             $info = $soapClient->ogloszeniaZP400KryteriaWyszukiwaniaJSON($ap_param);
  28.             return $info->Table;
  29.         } catch (SoapFault $fault) {
  30.             throw new Exception($fault, 1);
  31.         }
  32.     }
  33. }
  34.  
  35. $readZP400 = new readZP400();
  36. $readZP400->readJSON();
Advertisement
Add Comment
Please, Sign In to add comment