- var_dump: documentation ( source)
- error_log: documentation ( source)
- define: documentation ( source)
<?php
use GuzzleHttp\Client;
define("TOKEN",'quick');
define("SALT",'bax5Oh0oY5e5oleukeDi33chTeek7eeyOhthoh5o8Au9ceisaTuk5koogXaih1uolAegu1ohgtieGha3akohLerei8Ju8lahw1o9SouwoOhsh4iphEj1veiru');
$un = "your.user@digilant.com";
$pw = 'your.pass';
error_log($un);
error_log($pw);
$client = new Client();
/* @var GuzzleHttp\Psr7\Response $response */
$response = $client->post('http://10.20.10.251/api/login_check', [
'headers' => [],
'form_params' => [
'_username' => $un,
'_password' => $pw
],
'timeout' => 30,
'allow_redirects' => true,
]);
// here the body -> must to be converted with json_decode(...,true)
var_dump($response->getBody()->getContents());