
plain HTTP-style cookie转换为Netscape/Mozilla格式
使用说明
打开要获取网站网址, F12打开浏览器Console, 然后执行 alter(document.cookie); 复制到输入框进行转换。转换完后请将domain.com 替换为你的域名。
使用
wget 中使用
~wget --load-cookies cookies.txt http://example.org~
php 中使用
curl_setopt($this->request, CURLOPT_COOKIEJAR, $this->cookiesJar);
curl_setopt($this->request, CURLOPT_COOKIEFILE, $this->cookiesFile);
各个字段含义
-
domain - The domain that created AND that can read the variable.
-
flag - A TRUE/FALSE value indicating if all machines within a given domain can access the variable. This value is set automatically by the browser, depending on the value you set for domain.
-
path - The path within the domain that the variable is valid for.
-
secure - A TRUE/FALSE value indicating if a secure connection with the domain is needed to access the variable.
-
expiration - The UNIX time that the variable will expire on. UNIX time is defined as the number of seconds since Jan 1, 1970 00:00:00 GMT.
-
name - The name of the variable.
-
value - The value of the variable.