if (confirm('Вы являетесь разработчиком?')) {
location.href = 'https://github.com/...';
} else {
alert('А зря!');
}
file_get_contents('http://example.org');
$cookies = array();
foreach ($http_response_header as $hdr) {
if (preg_match('/^Set-Cookie:\s*([^;]+)/', $hdr, $matches)) {
parse_str($matches[1], $tmp);
$cookies += $tmp;
}
}
print_r($cookies);