public static function parsingCookieFile($cookieFile)
{
$handle = fopen($cookieFile, 'r');
for ($i = 0; $i < 4; $i++) {
if (!feof($handle)) {
fgets($handle);
}
}
$out = [];
while (!feof($handle)) {
$buffer = fgets($handle);
preg_match('/\tFALSE\t\/\tFALSE\t[0-9]+\t([^\t]*)\t(.*)/', $buffer, $found);
if (isset($found[1]) && isset($found[2])) {
$out[$found[1]] = $found[2];
}
}
fclose($handle);
return $out;
}