Hi all.
I am currently working on an improved spider that is able to get not only HTML content but also media that are not linked from the HTML-source directly.
This information is stored in the headers and can be logged with LiveHTTPheaders and/or Tamper Data (Firefox PlugIns).
What I would like to do is log the headers as they come in and are sent just like LiveHTTPheaders plugin does.
I have used UserAgent and WWW::Mechanize-no results, even after sending exactly the same headers as they were logged in FF.
I could get results with tshark but that is not what I want.
Question: is it possible to trace ALL incoming and outgoing headers with a CPAN-module that I can strip the location of the media taht are transported in the headers?
To demonstrate what I mean here is an example header from a LiveHTTPheaders log that plays a video after the URL has been loaded:
----------------------------------------------------------
http://somedomain.com/path/path/67c954839cbf962fe044893124536gtre3251.
+flv
GET /path/path/67c954839cbf962fe044893124536gtre3251.flv HTTP/1.1
Host: somedomain.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11)
+Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
+,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: ip_bt=38; wlrcmd=; __utma=68674883.507175212.1202182535.120218
+2535.1202182535.1; __utmb=68674883; __utmc=68674883; __utmz=68674883.
+1202182535.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); newsRea
+d=2008-02-04+16%3A47%3A23
HTTP/1.x 200 OK
Date: Tue, 05 Feb 2008 03:35:51 GMT
Server: Apache
Last-Modified: Mon, 04 Feb 2008 05:24:23 GMT
Etag: "a0148cea-287267-56362fc0"
Accept-Ranges: bytes
Content-Length: 2650727
Expires: Mon, 11 Feb 2008 06:18:17 GMT
Age: 76654
Keep-Alive: timeout=5, max=128
Connection: Keep-Alive
Content-Type: text/plain
----------------------------------------------------------
I have nver succeeded in getting the Host and GET-variable from the server.
Thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.