public function checkConnection()
{
$connection = false;
$loginUrl = "http://api.webepartners.pl/wydawca/Authorize?login={$this->_user}&password={$this->_pass}";
$context = \stream_context_create(array('http' => array('header' => "Authorization: Basic " . \base64_encode("{$this->_user}:{$this->_pass}"))));
$data = \file_get_contents($loginUrl, false, $context);
if ($data == true) {
$connection = true;
}
return $connection;
}