HTTPWatch简单分析视频网站
HTTPWatch简单分析视频网站
Author:zfive5(zhaozidong)
Email:[email protected]
前些日子一位朋友问到视频网站怎么做,今天晚上通过HttpWatch研究一下,
GET /xxxxx/4/186/24/GAmmLe7H8sFBOhIVDpt2J4.mp4?start=24&key=uxGCJi1c_HvRSENpK7wGyebgaUgtcqEUlfeHCw..&ch=tv&catcode=101101;101107&plat=flash_Windows7 HTTP/1.1
Accept: */*
Accept-Language: zh-CN
Referer: http://xxxxx/upload/swf/20130124/Main.swf
x-flash-version: 11,5,502,146
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Host: xxxx
Connection: Keep-Alive
HTTP/1.1 200 OK
Server: nginx
Date: Sun, 27 Jan 2013 13:32:22 GMT
Content-Type: video/mp4
Content-Length: 14752605
Last-Modified: Sun, 27 Jan 2013 13:21:11 GMT
Connection: keep-alive
Expires: Mon, 27 May 2013 13:32:22 GMT
Cache-Control: max-age=10368000
Accept-Ranges: bytes
...
通过HttpWatch分析现在的视频网站,发现Flash得到视频文件的也是通过HTTP协议得到的,在后台它们把视频分解成小段,URL其中的key就是这些小段文件的标识符,后台用到现在比较流行的nginx来实现,毕竟nginx对静态资源的处理性能要高些。