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

Functions

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

Bugs, Missing Features, and other Oddities

117       Javascript
118
119       WWW::Mechanize can't play back Javascript actions, and HTTP::Recorder
120       doesn't record them.
121
122       Why are my images corrupted?
123
124       HTTP::Recorder only tries to rewrite responses that are of type text/*,
125       which it determines by reading the Content-Type header of the
126       HTTP::Response object.  However, if the received image gives the wrong
127       Content-Type header, it may be corrupted by the recorder.  While this
128       may not be pleasant to look at, it shouldn't have an effect on your
129       recording session.
130

See Also

132       See also LWP::UserAgent, WWW::Mechanize, HTTP::Proxy.
133

Requests & Bugs

135       Please submit any feature requests, suggestions, bugs, or patches at
136       http://rt.cpan.org/, or email to bug-HTTP-Recorder@rt.cpan.org.
137
138       If you're submitting a bug of the type "X doesn't record correctly," be
139       sure to include a (preferably short and simple) HTML page that demon‐
140       strates the problem, and a clear explanation of a) what it does that it
141       shouldn't, and b) what it should do instead.
142

More information

144       You can read more about HTTP::Recorder, including browsing the current
145       source tree, at http://www.bitmistress.org/.
146
147       There's a mailing list for users and developers of HTTP::Recorder.  You
148       can subscribe at http://lists.fsck.com/mailman/listinfo/http-recorder,
149       or by sending email to http-recorder-request@lists.fsck.com with the
150       subject "subscribe".
151
152       Mailing list archives can be found at http://lists.fsck.com/piper
153       mail/http-recorder.
154

Author

156       Copyright 2003-2005 by Linda Julien <leira@cpan.org>
157
158       Released under the GNU Public License.
159
160
161
162perl v5.8.8                       2005-08-18                 HTTP::Recorder(3)
Impressum