Обновление лицензии и неймспейса

This commit is contained in:
RedHood
2020-06-07 15:00:39 +10:00
parent 3590441df5
commit d03461aa39
3 changed files with 149 additions and 92 deletions

View File

@@ -1,4 +1,5 @@
<?php
/**
* Created by PhpStorm.
* User: zerox
@@ -155,12 +156,12 @@ class Auth
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_values);
}
//
// curl_setopt($curl, CURLOPT_HTTPHEADER, [
// "Content-Type: application/x-www-form-urlencoded",
// "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
// "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
// ]);
//
// curl_setopt($curl, CURLOPT_HTTPHEADER, [
// "Content-Type: application/x-www-form-urlencoded",
// "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
// "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
// ]);
if ($cookie and isset($this->cookie)) {
$send_cookie = [];
@@ -170,7 +171,9 @@ class Auth
curl_setopt($curl, CURLOPT_COOKIE, join('; ', $send_cookie));
}
curl_setopt($curl, CURLOPT_HEADERFUNCTION,
curl_setopt(
$curl,
CURLOPT_HEADERFUNCTION,
function ($curl, $header) use (&$headers) {
$len = strlen($header);
$header = explode(':', $header, 2);