linux怎么用命令下电影,linux命令行---用wget下载电影

某些网站通过http header信息限制下载文件,在linux下面可以使用wget来模拟realplay等的,http header信息。

wget --head "ClientID: WinNT_5.0_6.0.12.1056_play32_R30CND_zh-CN_686_axembed" --head "User-Agent: RMA/1.0 (compatible; RealMedia)" http://localhost/head.php

说明:每一个header信息项用一个 --head参数来指定,可以多次使用 --head参数。

下面是我的http://localhost/head.php获得的header的信息:(关于php操作http header 参见:http://blog.csdn.net/islq/archive/2006/07/08/893434.aspx)

Array

(

[User-Agent] => RMA/1.0 (compatible; RealMedia)

[Accept] => */*

[Host] => localhost

[Connection] => Keep-Alive

[ClientID] => WinNT_5.0_6.0.12.1056_play32_R30CND_zh-CN_686_axembed

)

以下是下载成功和不成功的http链接信息记录:

> >从IE点播的http请求,播放成功。(VOD1.cap)

> >

> >GET /vod2/%5bTV%5dFZXF/01.rmvb HTTP/1.1

> >

> >Accept: */*

> >

> >User-Agent: RMA/1.0 (compatible; RealMedia)

> >

> >Icy-MetaData: 1

> >

> >Bandwidth: 10485800

> >

> >ClientID: WinNT_5.0_6.0.12.1056_play32_R30CND_zh-CN_686_axembed

> >

> >GUID: 00000000-0000-0000-0000-000000000000

> >

> >Language: zh-CN, zh, *

> >

> >RegionData: 0

> >

> >SupportsMaximumASMBandwidth: 1

> >

> >Connection: Keep-Alive

> >

> >Host: 10.146.189.104

> >

> >Accept-Language: zh-CN, zh, *

> >

> >Accept-Encoding: gzip

> >

> >===================================================================

> >从realplayer直接打开对应文件播放成功。(vod2.cap)

> >

> >GET /vod2/%5bTV%5dFZXF/01.rmvb HTTP/1.1

> >

> >Accept: */*

> >

> >User-Agent: RMA/1.0 (compatible; RealMedia)

> >

> >Icy-MetaData: 1

> >

> >Bandwidth: 10485800

> >

> >ClientID: WinNT_5.0_6.0.12.1056_RealPlayer_R30CND_zh-CN_686

> >

> >GUID: 00000000-0000-0000-0000-000000000000

> >

> >Language: zh-CN, zh, *

> >

> >RegionData: 0

> >

> >SupportsMaximumASMBandwidth: 1

> >

> >Connection: Keep-Alive

> >

> >Host: 10.146.189.104

> >

> >Accept-Language: zh-CN, zh, *

> >

> >Accept-Encoding: gzip

> >

> >

> >===================================================================

> >从IE直接下载该文件失败(vod3.cap)

> >GET /vod2/%5bTV%5dFZXF/01.rmvb HTTP/1.1

> >

> >Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*

> >

> >Accept-Language: zh-cn

> >

> >Accept-Encoding: gzip, deflate

> >

> >User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2)

> >

> >Host: 10.146.189.104

> >

> >Connection: Keep-Alive

> >

> >

> >

> >HTTP/1.1 403 Forbidden

> >

> >Date: Tue, 04 Jul 2006 16:33:16 GMT

> >

> >Server: Apache/2.0.52 (Unix) PHP/4.3.10

> >

> >Content-Length: 312

> >

> >Keep-Alive: timeout=15, max=100

> >

> >Connection: Keep-Alive

> >

> >Content-Type: text/html; charset=iso-8859-1

> >

> >

> >

> >

> >

> >

403 Forbidden

> >

> >

Forbidden

> >

You don't have permission to access /vod2/[TV]FZXF/01.rmvb

> >on this server.

> >


> >

Apache/2.0.52 (Unix) PHP/4.3.10 Server at 10.146.189.104 Port 80

> >

> >

> >

> >===================================================================

> >迅雷下载失败(vod4.cap)

> >GET /vod2/%5bTV%5dFZXF/01.rmvb HTTP/1.1

> >

> >Host: 10.146.189.104

> >

> >Accept: */*

> >

> >User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)

> >

> >Referer: http://10.146.189.104/vod2/%5bTV%5dFZXF

> >

> >Pragma: no-cache

> >

> >Cache-Control: no-cache

> >

> >Connection: close

> >

> >

> >

> >HTTP/1.1 403 Forbidden

> >

> >Date: Tue, 04 Jul 2006 16:36:20 GMT

> >

> >Server: Apache/2.0.52 (Unix) PHP/4.3.10

> >

> >Content-Length: 312

> >

> >Connection: close

> >

> >Content-Type: text/html; charset=iso-8859-1

> >

> >

> >

> >

> >

> >

403 Forbidden

> >

> >

Forbidden

> >

You don't have permission to access /vod2/[TV]FZXF/01.rmvb

> >on this server.

> >


> >

Apache/2.0.52 (Unix) PHP/4.3.10 Server at 10.146.189.104 Port 80

> >

> >

> >

> >===================================================================

> >flashget下载失败(vod5.cap)

> >

> >GET /vod2/%5bTV%5dFZXF/01.rmvb HTTP/1.1

> >

> >Host: 10.146.189.104

> >

> >Accept: */*

> >

> >Referer: http://www.freescale.com.cn/Applications/automotive_mpc5200.asp> >> >User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)> >> >Pragma: no-cache> >> >Cache-Control: no-cache> >> >Connection: close> >> >> >> >HTTP/1.1 403 Forbidden> >> >Date: Tue, 04 Jul 2006 16:41:39 GMT> >> >Server: Apache/2.0.52 (Unix) PHP/4.3.10> >> >Content-Length: 312> >> >Connection: close> >> >Content-Type: text/html; charset=iso-8859-1> >> >> >> >> >

> >403 Forbidden> >> >

Forbidden

> >

You don't have permission to access /vod2/[TV]FZXF/01.rmvb> >on this server.

> >
> >
Apache/2.0.52 (Unix) PHP/4.3.10 Server at 10.146.189.104 Port 80
> >
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值