1HTTP::Recorder(3)     User Contributed Perl Documentation    HTTP::Recorder(3)
2
3
4

NAME

6       HTTP::Recorder - record interaction with websites
7

VERSION

9       Version 0.05
10

SYNOPSIS

12   Using HTTP::Recorder as a Web Proxy
13       Set HTTP::Recorder as the user agent for a proxy, and it rewrites HTTP
14       responses so that additional requests can be recorded.
15
16       The Proxy Script
17
18       Set it up like this:
19
20           #!/usr/bin/perl
21
22           use HTTP::Proxy;
23           use HTTP::Recorder;
24
25           my $proxy = HTTP::Proxy->new();
26
27           # create a new HTTP::Recorder object
28           my $agent = new HTTP::Recorder;
29
30           # set the log file (optional)
31           $agent->file("/tmp/myfile");
32
33           # set HTTP::Recorder as the agent for the proxy
34           $proxy->agent( $agent );
35
36           # start the proxy
37           $proxy->start();
38
39           1;
40
41       Start the proxy script, then change the settings in your web browser so
42       that it will use this proxy for web requests.  For more information
43       about proxy settings and the default port, see HTTP::Proxy.
44
45       The script will be recorded in the specified file, and can be viewed
46       and modified via the control panel.
47
48       Start Recording
49
50       Now you can use your browser as your normally would, and your actions
51       will be recorded in the file you specified.  Alternatively, you can
52       start recording from the Control Panel.
53
54       Using the Control Panel
55
56       If you have Javascript enabled in your browser, go to the
57       HTTP::Recorder control URL (http://http-recorder by default),
58       optionally type a URL into the "Goto page" field, and click "Go".
59
60       In the new window, interact with web sites as you normally do,
61       including typing a new address into the address field.  The Control
62       Panel will be updated after each recorded action.
63
64       The Control Panel allows you to modify, delete, or save your script.
65
66   SSL sessions
67       As of version 0.03, HTTP::Recorder can record SSL sessions.
68
69       To begin recording an SSL session, go to the control URL
70       (http://http-recorder/ by default), and enter the initial URL.  Then,
71       interact with the web site as usual.
72
73   Script output
74       By default, HTTP::Recorder outputs WWW::Mechanize scripts.
75
76       However, you can override HTTP::Recorder::Logger to output other types
77       of scripts.
78

Functions

80   new
81       Creates and returns a new HTTP::Recorder object, referred to as the
82       'agent'.
83
84   $agent->prefix([$value])
85       Get or set the prefix string that HTTP::Recorder uses for rewriting
86       responses.
87
88   $agent->control([$value])
89       Get or set the URL of the control panel.  By default, the control URL
90       is 'http-recorder'.
91
92       The control URL will display a control panel which will allow you to
93       view and edit the current script.
94
95   $agent->logger([$value])
96       Get or set the logger object.  The default logger is a
97       HTTP::Recorder::Logger, which generates WWW::Mechanize scripts.
98
99   $agent->ignore_favicon([0|1])
100       Get or set ignore_favicon flag that causes HTTP::Recorder to skip
101       logging requests favicon.ico files.  The value is 1 by default.
102
103   $agent->file([$value])
104       Get or set the filename for generated scripts.  The default is
105       '/tmp/scriptfile'.
106

Bugs, Missing Features, and other Oddities

108   Javascript
109       WWW::Mechanize can't play back Javascript actions, and HTTP::Recorder
110       doesn't record them.
111
112   Why are my images corrupted?
113       HTTP::Recorder only tries to rewrite responses that are of type text/*,
114       which it determines by reading the Content-Type header of the
115       HTTP::Response object.  However, if the received image gives the wrong
116       Content-Type header, it may be corrupted by the recorder.  While this
117       may not be pleasant to look at, it shouldn't have an effect on your
118       recording session.
119

See Also

121       See also LWP::UserAgent, WWW::Mechanize, HTTP::Proxy.
122

Requests & Bugs

124       Please submit any feature requests, suggestions, bugs, or patches at
125       http://rt.cpan.org/, or email to bug-HTTP-Recorder@rt.cpan.org.
126
127       If you're submitting a bug of the type "X doesn't record correctly," be
128       sure to include a (preferably short and simple) HTML page that
129       demonstrates the problem, and a clear explanation of a) what it does
130       that it shouldn't, and b) what it should do instead.
131

More information

133       You can read more about HTTP::Recorder, including browsing the current
134       source tree, at http://www.bitmistress.org/.
135
136       There's a mailing list for users and developers of HTTP::Recorder.  You
137       can subscribe at http://lists.fsck.com/mailman/listinfo/http-recorder,
138       or by sending email to http-recorder-request@lists.fsck.com with the
139       subject "subscribe".
140
141       Mailing list archives can be found at
142       http://lists.fsck.com/pipermail/http-recorder.
143

Author

145       Copyright 2003-2005 by Linda Julien <leira@cpan.org>
146
147       Released under the GNU Public License.
148
149
150
151perl v5.12.0                      2005-08-19                 HTTP::Recorder(3)
Impressum