curl 命令详解
作者:admin 日期:2022-04-17
curl 是一种命令行工具,作用是发出网络请求,然后获取数据,显示在"标准输出"(stdout)上面。它支持多种协议,下面列举其常用功能。
一、查看网页源码
直接在 curl 命令后加上网址,就可以看到网页源码。以网址 www.sina.com为例(选择该网址,主要因为它的网页代码较短)。
$ curl www.sina.com <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx</center> </body> </html>
如果要把这个网页保存下来,可以使用 -o 参数:
$ curl -o [文件名] www.sina.com
二、自动跳转
有的网址是自动跳转的。使用 -L 参数,curl 就会跳转到新的网址。
$ curl -L www.sina.com
键入上面的命令,结果自动跳转为 www.sina.com.cn。
三、显示头信息
php伪造来路客户端curl采集代码
作者:admin 日期:2012-10-02
- $reffer='';//来路
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, $url);// 设置你需要抓取的URL
- curl_setopt($curl, CURLOPT_HEADER, false);// 设置header
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- //curl_setopt($curl, CURLOPT_MAXREDIRS, );
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);// 设置cURL 参数,要求结果保存到字符串中还是输出到屏幕上。
- curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.1;+Trident/4.0)');//客户端
- curl_setopt($curl, CURLOPT_REFERER, $reffer);//伪造来源地址
- curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);//强制新连接,替代缓存
- curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5); // 设置连接超时时间
- curl_setopt($curl, CURLOPT_TIMEOUT, 120); // 设置CURL超时时间
- $html = curl_exec($curl);// 运行cURL,请求网页
php CURL post使用
作者:admin 日期:2012-09-01
cURL 是一个利用URL语法规定来传输文件和数据的工具,支持很多协议,如HTTP、FTP、TELNET等。最爽的是,PHP也支持 cURL 库。本文将介绍 cURL 的一些高级特性,以及在PHP中如何运用它。
为什么要用 cURL?
是的,我们可以通过其他办法获取网页内容。大多数时候,我因为想偷懒,都直接用简单的PHP函数:
不过,这种做法缺乏灵活性和有效的错误处理。而且,你也不能用它完成一些高难度任务——比如处理coockies、验证、表单提交、文件上传等等。
引用:
cURL 是一种功能强大的库,支持很多不同的协议、选项,能提供 URL 请求相关的各种细节信息。
基本结构
在学习更为复杂的功能之前,先来看一下在PHP中建立cURL请求的基本步骤:
1 初始化
2 设置变量
3 执行并获取结果
4 释放cURL句柄
以下为引用的内容:
// 1. 初始化
$ch = curl_init();
// 2. 设置选项,包括URL
curl_setopt($ch, CURLOPT_URL, "http://www.nettuts.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
// 3. 执行并获取HTML文档内容
$output = curl_exec($ch);
// 4. 释放curl句柄
curl_close($ch);
检查错误
你可以加一段检查错误的语句(虽然这并不是必需的):
$output = curl_exec($ch);
if ($output === FALSE) {
echo "cURL Error: " . curl_error($ch);
}
请注意,比较的时候我们用的是“=== FALSE”,而非“== FALSE”。因为我们得区分 空输出 和 布尔值FALSE,后者才是真正的错误。
用POST方法发送数据
当发起GET请求时,数据可以通过“查询字串”(query string)传递给一个URL。例如,在google中搜索时,搜索关键即为URL的查询字串的一部分:
http://www.google.com/search?q=nettuts
这种情况下你可能并不需要cURL来模拟。把这个URL丢给“file_get_contents()”就能得到相同结果。
不过有一些HTML表单是用POST方法提交的。这种表单提交时,数据是通过 HTTP请求体(request body) 发送,而不是查询字串。例如,当使用CodeIgniter论坛的表单,无论你输入什么关键字,总是被POST到如下页面:
http://codeigniter.com/forums/do_search/
你可以用PHP脚本来模拟这种URL请求。首先,新建一个可以接受并显示POST数据的文件
- <?php
- //使用discuzX2.0作测试
- //创建cookie临时文件
- $cookiefile = tempnam('./temp', 'cookie');
- $url = 'http://dx/member.php?mod=logging&action=login&loginsubmit=yes';
- $post_data = array(
- 'loginfield' => 'username',
- 'username' => 'ybb',
- 'password' => '123456',
- );
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- // 我们在POST数据哦!
- curl_setopt($ch, CURLOPT_POST, 1);
- // 把post的变量加上
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
- //保存cookie文件
- curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);
- $output = curl_exec($ch);
- //调试使用
- if ($output === FALSE) {
- echo "cURL Error: " . curl_error($ch);
- }
- curl_close($ch);
- //进出到发贴页面
- $post_url = 'http://dx/forum.php?mod=post&action=newthread&fid=2';
- $ch = curl_init($post_url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- //读取cookie 文件
- curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
- echo $data = curl_exec($ch);
- curl_close($ch);
- ?>
Php使用curl模拟浏览器采集网页
作者:admin 日期:2012-06-16
Php使用curl模拟浏览器采集网页
- <?php
- set_time_limit(0);
- function _rand() {
- $length=26;
- $chars = "0123456789abcdefghijklmnopqrstuvwxyz";
- $max = strlen($chars) - 1;
- mt_srand((double)microtime() * 1000000);
- $string = '';
- for($i = 0; $i < $length; $i++) {
- $string .= $chars[mt_rand(0, $max)];
- }
- return $string;
- }
- $HTTP_SESSION=_rand();
- $HTTP_SESSION;
- $HTTP_Server="search.china.alibaba.com";
- $HTTP_URL="/company/k-%CB%AE%CB%AE%CB%AE_n-y.html";
- $ch = curl_init();
- curl_setopt ($ch,CURLOPT_URL,"http://".$HTTP_Server.$HTTP_URL);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
- curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)");
- $res = curl_exec($ch);
- curl_close ($ch);
- print_r($res);
- ?>
PHP+IIS 开启CURL组件支持
作者:admin 日期:2012-05-21
php Curl参考资料
作者:admin 日期:2012-05-07
Curl函数:
- curl_close — 关闭一个cURL会话
- curl_copy_handle — 复制一个cURL句柄和它的所有选项
- curl_errno — 返回最后一次的错误号
- curl_error — 返回一个保护当前会话最近一次错误的字符串
- curl_exec — 执行一个cURL会话
- curl_getinfo — 获取一个cURL连接资源句柄的信息
- curl_init — 初始化一个cURL会话
- curl_multi_add_handle — 向curl批处理会话中添加单独的curl句柄
- curl_multi_close — 关闭一组cURL句柄
- curl_multi_exec — 解析一个cURL批处理句柄
- curl_multi_getcontent — 如果设置了CURLOPT_RETURNTRANSFER,则返回获取的输出的文本流
- curl_multi_info_read — 获取当前解析的cURL的相关传输信息
- curl_multi_init — 返回一个新cURL批处理句柄
- curl_multi_remove_handle — 移除curl批处理句柄资源中的某个句柄资源
- curl_multi_select — 等待所有cURL批处理中的活动连接
- curl_setopt_array — 为cURL传输会话批量设置选项
- curl_setopt — 设置一个cURL传输选项
- curl_version — 获取cURL版本信息
curl_setopt — 设置一个cURL传输选项
语法:bool curl_setopt ( resource $ch , int $option , mixed $value )
ch:由 curl_init() 返回的 cURL 句柄。
option:需要设置的CURLOPT_XXX选项。
value:将设置在option选项上的值。
在PHP中使用Curl
作者:admin 日期:2012-04-25
你可能在你的编写PHP脚本代码中会遇到这样的问题:怎么样才能从其他站点获取内容呢?这里有几个解决方式;最简单的就是在php中使用fopen()函数,但是fopen函数没有足够的参数来使用,比如当你想构建一个“网络爬虫”,想定义爬虫的客户端描述(IE,firefox),通过不同的请求方式来获取内容,比如POST,GET;等等这些需求是不可能用fopen()函数实现的。
为了解决我们上面提出的问题,我们可以使用PHP的扩展库-Curl,这个扩展库通常是默认在安装包中的,你可以它来获取其他站点的内容,也可以来干别的。
在这篇文章中,我们一起来看看如何使用curl库,并看看它的其他用处,但是接下来,我们要从最基本的用法开始
PHP CURL_MULTI 多线程采集网页函数
作者:admin 日期:2012-04-24
PHP CURL_MULTI 多线程采集网页函数
- <?php
- $text = remote(array('http://www.imfeng.com/','http://www.aligaduo.com/'));
- print_r($text);
- function remote($urls) {
- if (!is_array($urls) or count($urls) == 0) {
- return false;
- }
- $curl = $text = array();
- $handle = curl_multi_init();
- foreach($urls as $k => $v) {
- $nurl[$k]= preg_replace('~([^:\/\.]+)~ei', "rawurlencode('\\1')", $v);
- $curl[$k] = curl_init($nurl[$k]);
- curl_setopt($curl[$k], CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl[$k], CURLOPT_HEADER, 0);
- curl_multi_add_handle ($handle, $curl[$k]);
- }
- $active = null;
- do {
- $mrc = curl_multi_exec($handle, $active);
- } while ($mrc == CURLM_CALL_MULTI_PERFORM);
- while ($active && $mrc == CURLM_OK) {
- if (curl_multi_select($handle) != -1) {
- do {
- $mrc = curl_multi_exec($handle, $active);
- } while ($mrc == CURLM_CALL_MULTI_PERFORM);
- }
- }
- foreach ($curl as $k => $v) {
- if (curl_error($curl[$k]) == "") {
- $text[$k] = (string) curl_multi_getcontent($curl[$k]);
- }
- curl_multi_remove_handle($handle, $curl[$k]);
- curl_close($curl[$k]);
- }
- curl_multi_close($handle);
- return $text;
- }
CURL用法
作者:admin 日期:2012-04-07
CURL是一个超强的命令行工具,其功能非常强大,有Linux/Unix版本的,也有Windows版本的,我平时就经常在Windows下面使用curl做一些测试,非常方便,有时用curl做测试比用浏览器做测试要快得多,方便得多。
1.curl命令帮助选项
C:\>curl --help
Usage: curl [options...] <url>
Options: (H) means HTTP/HTTPS only, (F) means FTP only
-a/--append Append to target file when uploading (F)
-A/--user-agent <string> User-Agent to send to server (H)
--anyauth Tell curl to choose authentication method (H)
-b/--cookie <name=string/file> Cookie string or file to read cookies from (H)
--basic Enable HTTP Basic Authentication (H)
-B/--use-ascii Use ASCII/text transfer
-c/--cookie-jar <file> Write cookies to this file after operation (H)
-C/--continue-at <offset> Resumed transfer offset
-d/--data <data> HTTP POST data (H)
--data-ascii <data> HTTP POST ASCII data (H)
--data-binary <data> HTTP POST binary data (H)
--negotiate Enable HTTP Negotiate Authentication (H)
--digest Enable HTTP Digest Authentication (H)
--disable-eprt Prevent curl from using EPRT or LPRT (F)
--disable-epsv Prevent curl from using EPSV (F)
-D/--dump-header <file> Write the headers to this file
--egd-file <file> EGD socket path for random data (SSL)
--tcp-nodelay Set the TCP_NODELAY option
-e/--referer Referer URL (H)
-E/--cert <cert[:passwd]> Client certificate file and password (SSL)
--cert-type <type> Certificate file type (DER/PEM/ENG) (SSL)
--key <key> Private key file name (SSL)
--key-type <type> Private key file type (DER/PEM/ENG) (SSL)
--pass <pass> Pass phrase for the private key (SSL)
--engine <eng> Crypto engine to use (SSL). "--engine list" for list
--cacert <file> CA certificate to verify peer against (SSL)
--capath <directory> CA directory (made using c_rehash) to verify
peer against (SSL)
--ciphers <list> SSL ciphers to use (SSL)
--compressed Request compressed response (using deflate or gzip)
--connect-timeout <seconds> Maximum time allowed for connection
--create-dirs Create necessary local directory hierarchy
--crlf Convert LF to CRLF in upload
-f/--fail Fail silently (no output at all) on errors (H)
--ftp-create-dirs Create the remote dirs if not present (F)
--ftp-pasv Use PASV instead of PORT (F)
--ftp-ssl Enable SSL/TLS for the ftp transfer (F)
-F/--form <name=content> Specify HTTP multipart POST data (H)
--form-string <name=string> Specify HTTP multipart POST data (H)
-g/--globoff Disable URL sequences and ranges using {} and []
-G/--get Send the -d data with a HTTP GET (H)
-h/--help This help text
-H/--header <line> Custom header to pass to server (H)
-i/--include Include protocol headers in the output (H/F)
-I/--head Show document info only
-j/--junk-session-cookies Ignore session cookies read from file (H)
--interface <interface> Specify network interface to use
--krb4 <level> Enable krb4 with specified security level (F)
-k/--insecure Allow curl to connect to SSL sites without certs (H)
-K/--config Specify which config file to read
-l/--list-only List only names of an FTP directory (F)
--limit-rate <rate> Limit transfer speed to this rate
-L/--location Follow Location: hints (H)
--location-trusted Follow Location: and send authentication even
to other hostnames (H)
-m/--max-time <seconds> Maximum time allowed for the transfer
--max-redirs <num> Maximum number of redirects allowed (H)
--max-filesize <bytes> Maximum file size to download (H/F)
-M/--manual Display the full manual
-n/--netrc Must read .netrc for user name and password
--netrc-optional Use either .netrc or URL; overrides -n
--ntlm Enable HTTP NTLM authentication (H)
-N/--no-buffer Disable buffering of the output stream
-o/--output <file> Write output to <file> instead of stdout
-O/--remote-name Write output to a file named as the remote file
-p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)
--proxy-anyauth Let curl pick proxy authentication method (H)
--proxy-basic Enable Basic authentication on the proxy (H)
--proxy-digest Enable Digest authentication on the proxy (H)
--proxy-ntlm Enable NTLM authentication on the proxy (H)
-P/--ftp-port <address> Use PORT with address instead of PASV (F)
-q If used as the first parameter disables .curlrc
-Q/--quote <cmd> Send command(s) to server before file transfer (F)
-r/--range <range> Retrieve a byte range from a HTTP/1.1 or FTP server
--random-file <file> File for reading random data from (SSL)
-R/--remote-time Set the remote file's time on the local output
--retry <num> Retry request <num> times if transient problems occur
--retry-delay <seconds> When retrying, wait this many seconds between each
--retry-max-time <seconds> Retry only within this period
-s/--silent Silent mode. Don't output anything
-S/--show-error Show error. With -s, make curl show errors when they occur
--socks <host[:port]> Use SOCKS5 proxy on given host + port
--stderr <file> Where to redirect stderr. - means stdout
-t/--telnet-option <OPT=val> Set telnet option
--trace <file> Write a debug trace to the given file
--trace-ascii <file> Like --trace but without the hex output
-T/--upload-file <file> Transfer <file> to remote site
--url <URL> Spet URL to work with
-u/--user <user[:password]> Set server user and password
-U/--proxy-user <user[:password]> Set proxy user and password
-v/--verbose Make the operation more talkative
-V/--version Show version number and quit
-w/--write-out [format] What to output after completion
-x/--proxy <host[:port]> Use HTTP proxy on given port
-X/--request <command> Specify request command to use
-y/--speed-time Time needed to trig speed-limit abort. Defaults to 30
-Y/--speed-limit Stop transfer if below speed-limit for 'speed-time' secs
-z/--time-cond <time> Transfer based on a time condition
-0/--http1.0 Use HTTP 1.0 (H)
-1/--tlsv1 Use TLSv1 (SSL)
-2/--sslv2 Use SSLv2 (SSL)
-3/--sslv3 Use SSLv3 (SSL)
--3p-quote like -Q for the source URL for 3rd party transfer (F)
--3p-url source URL to activate 3rd party transfer (F)
--3p-user user and password for source 3rd party transfer (F)
-4/--ipv4 Resolve name to IPv4 address
-6/--ipv6 Resolve name to IPv6 address
-#/--progress-bar Display transfer progress as a progress bar
2.查找页面源代码中的指定内容
例如查找京东商城首页含有js的代码
C:\>curl www.360buy.com | find "js"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
19 158k 19 31744 0 0 53531 0 0:00:03 --:--:-- 0:00:03 65947<s
cript type="text/javascript" src="http://misc.360buyimg.com/201006/js/jquery-1.2
.6.pack.js"></script>
<script type="text/javascript" src="http://misc.360buyimg.com/201007/js/g.base.j
s"></script>
76 158k 76 121k 0 0 10763 0 0:00:15 0:00:11 0:00:04 7574<s
pan><a href="http://www.360buy.com/help/ziti/jiangsu.aspx#jssq" target="_blank">
宿迁</a></span>
99 158k 99 158k <span><a href="http://www.360buy.com/hel p/ziti/jiangsu.a
spx#jsnt" target="_blank0">南通</a></span>
100 158k 100 158k 0 0 12557 0 0:00:12 0:00:12 --:--:-- 18859
<script type="text/javascript" src="http://misc.360buyimg.com/201007/js/
jd.lib.js"></script>
<script type="text/javascript" src="http://misc.360buyimg.com/201007/js/
p.index.js"></script>
<script type="text/javascript" src="http://wl.360buy.com/wl.js" ></scrip
t>
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.
js' type='text/javascript'%3E%3C/script%3E"));
2.发送POST请求
a.传递一个参加时可以不用双引号
C:\>curl -d action=get_basic_info http://localhost/1616.net/apps/contact/www/mobile.php
[{"contact_id":"3","last_update_time":"1285832338","md5":"7b682e0c3ed3b3bddb3219
a533477224"},{"contact_id":"2","last_update_time":"1286529929","md5":"49ac542f51
19512682b72f1d44e6fe81"},{"contact_id":"1","last_update_time":"1285830870","md5"
:"3926cb3b0320327c46430c6539d58e5e"}]
b.传递多个参加时必须用双引号,否则会报错
C:\>curl -d "action=edit&contact_id=2&name=testurl" http://localhost/1616.net/apps/contact/www/mobile.php
1
3.下载文件
比如下载百度首页的内容为baidu.html
C:\>curl -o baidu.html www.baidu.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6218 100 6218 0 0 61564 0 --:--:-- --:--:-- --:--:-- 173k
4.将网站产生的cookie内容写入到文件中
用curl -c cookie.txt www.baidu.com
产生的文件cookie.txt的内容如下:
# Netscape HTTP Cookie File
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
.baidu.com TRUE / FALSE 2147483647 BAIDUID 3EC2799E83C7187A26CBBA67CCB71822:FG=1
5.测试域名绑定
输入命令
C:\>curl -H "Host:www.baidu.com" http://202.108.22.5/
ip地址202.108.22.5是ping域名www.baidu.com以后返回的ip地址。
则返回百度首页所有的内容
如果随便输入一个域名www.abc.com,而ip地址不改变,则返回内容是空的,因为域名与ip地址不匹配了,这样就可以测试域名绑定是否正确了。
C:\>curl -H "Host:www.abc.com" http://202.108.22.5/
curl: (52) Empty reply from server
6.查看网站头信息
C:\>curl -I www.baidu.com
HTTP/1.1 200 OK
Date: Fri, 08 Oct 2010 15:32:06 GMT
Server: BWS/1.0
Content-Length: 6218
Content-Type: text/html;charset=gb2312
Cache-Control: private
Expires: Fri, 08 Oct 2010 15:32:06 GMT
Set-Cookie: BAIDUID=6E8167DF4E04A22A0659BBA1BE2905E7:FG=1; expires=Fri, 08-Oct-4
0 15:32:06 GMT; path=/; domain=.baidu.com
P3P: CP=" OTI DSP COR IVA OUR IND COM "
Connection: Keep-Alive
7.查看URL跳转
C:\>curl -L -I www.google.com
HTTP/1.1 302 Found
Location: http://www.google.com.hk/url?sa=p&hl=zh-CN&cki=PREF%3DID%3Dd0fa5e644a9
f891c:FF%3D2:LD%3Dzh-CN:NW%3D1:TM%3D1286551973:LM%3D1286551973:S%3DPQB5WhVsd17Bq
38k&q=http://www.google.com.hk/&ust=1286552003174649&usg=AFQjCNEwGJlI-YF0TG-6BiW
ILw7U2qsr5Q
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=d0fa5e644a9f891c:NW=1:TM=1286551973:LM=1286551973:S=oAe_1PXO
MrFd73Jy; expires=Sun, 07-Oct-2012 15:32:53 GMT; path=/; domain=.google.com
Set-Cookie: NID=39=C_aIB4kMtsJnMR5kwJKF9XAhB9_sEKTp5Qe-Y6Zcu7nNVrrBmKrr-687Zhf_r
-wVNniv4kbb8BRCBR52EN2HdxaL2lGCBxUlEWjkGdZctAqdjyzZbwTb2Hh05UgYMTIO; expires=Sat
, 09-Apr-2011 15:32:53 GMT; path=/; domain=.google.com; HttpOnly
Date: Fri, 08 Oct 2010 15:32:53 GMT
Server: gws
Content-Length: 458
X-XSS-Protection: 1; mode=block
HTTP/1.1 302 Found
Location: http://www.google.com.hk/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=d0fa5e644a9f891c:FF=2:LD=zh-CN:NW=1:TM=1286551973:LM=1286551
973:S=PQB5WhVsd17Bq38k; expires=Sun, 07-Oct-2012 15:32:53 GMT; path=/; domain=.g
oogle.com.hk
Date: Fri, 08 Oct 2010 15:32:53 GMT
Server: gws
Content-Length: 222
X-XSS-Protection: 1; mode=block
HTTP/1.1 200 OK
Date: Fri, 08 Oct 2010 15:32:53 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=Big5
Set-Cookie: PREF=ID=3f9f2340941ea76f:NW=1:TM=1286551973:LM=1286551973:S=m9wrFWJe
Jbk4aFK2; expires=Sun, 07-Oct-2012 15:32:53 GMT; path=/; domain=.google.com.hk
Set-Cookie: NID=39=Mlebw-qjMEK1ABTu-W1YWoQ-Tk27--cOtwLLrDWhmU8y0fqwgeyNz06XBZsYG
9yNwSCO_Ryzzt7q1GUXHgrM2jijr9vmLsW9ZXT2k6pve8f-IrdMyLJok4lRImiskdLR; expires=Sat
, 09-Apr-2011 15:32:53 GMT; path=/; domain=.google.com.hk; HttpOnly
Server: gws
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
curl: (18) transfer closed with outstanding read data remaining
广告位