23423423testsadfsadfasdf234234asdfdsfasdfasdfasd - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of 23423423testsadfsadfasdf234234asdfdsfasdfasdfasd.php
- <?php
- // получаем все хедеры
- $headers = getallheaders();
- $method = $headers['cash-free-method']; // каким методом надо отправить
- $url = $headers['cash-free-url']; // на какой URL надо отправить
- $expectsResponse = $headers['cash-free-expects-response']; // ждем ли ответ
- $accept = $headers['Accept']; // прокидываем без изменений
- $authorization = $headers['Authorization']; // прокидываем без изменений
- $client = new \GuzzleHttp\Client();
- $response = $client->request($method, $url, [
- 'headers' => [
- 'Accept' => $accept,
- 'Authorization' => $authorization,
- ],
- ]);
- if ('true' === $expectsResponse) {
- echo $response; // если надо то отправляем ответ
- }
File Description
- 23423423testsadfsadfasdf234234asdfdsfasdfasdfasd
- PHP Code
- 19 Oct-2021
- 893 Bytes
You can Share it:
Latest PHP Pastes