Created
July 25, 2022 11:08
-
-
Save jakubboucek/de9652d2573f694e45d8bbc9ed3a3fc5 to your computer and use it in GitHub Desktop.
Subreg.cz SOAP request /w Bearer token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$token = 'FILL/YOUR/TOKEN/HERE+FILL/YOUR/TOKEN/HERE='; // <-- Fill it | |
$context = stream_context_create([ | |
'http' => [ | |
'protocol_version' => 1.1, | |
'header' => "Authorization: Bearer {$token}", | |
], | |
]); | |
$client = new SoapClient( | |
null, | |
[ | |
'location' => 'https://soap.subreg.cz/cmd.php', | |
'uri' => 'https://soap.subreg.cz/soap', | |
'soap_version' => SOAP_1_2, | |
'stream_context' => $context, | |
'trace' => 1, | |
] | |
); | |
try { | |
$responseContent = $client->__soapCall( | |
'Domains_List', | |
['data' => []] | |
); | |
var_dump($responseContent); | |
} catch (SoapFault $e) { | |
var_dump($e); | |
} | |
var_dump($client); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment