Leser: 1
|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use HTTP::Cookies;
use HTTP::Request::Common;
use LWP::UserAgent;
my $cookie_jar = HTTP::Cookies->new();
my $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.12) Gecko/20050919 Firefox/1.0.7";
my $ua = LWP::UserAgent->new;
$ua->cookie_jar( $cookie_jar );
$ua->agent( $agent );
my $query_resp = $ua->request(POST "h++p://localhost/phpmyadmin/server_sql.php",
[sql_query => 'CREATE DATABASE `123`;',
SQL => 'OK']);
1
2
3
4
5
6
if ($query_resp->is_success) {
print $query_resp->content; # or whatever
}
else {
die $query_resp->status_line;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
: send()
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
HTTP::Cookies::add_cookie_header: Checking localhost.local for cookies
HTTP::Cookies::add_cookie_header: Checking .local for cookies
LWP::UserAgent::send_request: POST http://localhost/phpmyadmin/server_sql.php
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 1012 bytes
LWP::Protocol::collect: read 4096 bytes
LWP::Protocol::collect: read 4096 bytes
LWP::Protocol::collect: read 1138 bytes
HTTP::Cookies::extract_cookies: Set cookie phpMyAdmin => 13af19a5bbcf3e69fccbd5c
b0554fd0a
HTTP::Cookies::extract_cookies: Set cookie pma_fontsize => 100%25
HTTP::Cookies::extract_cookies: Set cookie pma_lang => de-utf-8
HTTP::Cookies::extract_cookies: Set cookie pma_charset => iso-8859-1
HTTP::Cookies::extract_cookies: Set cookie pma_collation_connection => utf8_unic
ode_ci
HTTP::Cookies::extract_cookies: Set cookie pma_theme => darkblue_orange
LWP::UserAgent::request: Simple response: OK
print 'CREATE DATABASE `123`;';
print $query_resp->as_string;
HTTP/1.1 200 OK Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0 Connection: close Date: Mon, 12 Mar 2007 16:31:34 GMT Pragma: no-cache Server: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1 Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=utf-8 Expires: Mon, 12 Mar 2007 16:31:36 GMT Last-Modified: Mon, 12 Mar 2007 16:31:36 GMT Client-Date: Mon, 12 Mar 2007 16:31:36 GMT Client-Peer: 127.0.0.1:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Link: <./favicon.ico>; /="/"; rel="icon"; type="image/x-icon" Link: <./favicon.ico>; /="/"; rel="shortcut icon"; type="image/x-icon" Link: <./css/phpmyadmin.css.php?lang=de-utf-8&convcharset=iso-8859-1&collation_connection=utf8_unicode_ci&token=57c71ca5dc1942dc5375690bc15fce56&js_frame=right>; /="/"; rel="stylesheet"; type="text/css" Link: <./css/print.css?lang=de-utf-8&convcharset=iso-8859-1&collation_connection=utf8_unicode_ci&token=57c71ca5dc1942dc5375690bc15fce56>; /="/"; media="print"; rel="stylesheet"; type="text/css" Set-Cookie: phpMyAdmin=57af93198d5c443fbd349cc7d50bfc2c; path=/phpmyadmin/ Set-Cookie: pma_fontsize=100%25; expires=Wed, 11-Apr-2007 16:31:35 GMT; path=/phpmyadmin/ Set-Cookie: pma_lang=de-utf-8; expires=Wed, 11-Apr-2007 16:31:36 GMT; path=/phpmyadmin/ Set-Cookie: pma_charset=iso-8859-1; expires=Wed, 11-Apr-2007 16:31:36 GMT; path=/phpmyadmin/ Set-Cookie: pma_collation_connection=utf8_unicode_ci; expires=Wed, 11-Apr-2007 16:31:36 GMT; path=/phpmyadmin/ Set-Cookie: pma_theme=darkblue_orange; expires=Wed, 11-Apr-2007 16:31:36 GMT; path=/phpmyadmin/ Title: phpMyAdmin X-Meta-OBGZip: true X-Ob-Mode: 0 X-Powered-By: PHP/5.2.1
|< 1 2 >| | 14 Einträge, 2 Seiten |