set head off
set feed off
set termout off
set serveroutput on
spool d:test.html
DECLARE
req utl_http.req;
resp utl_http.resp;
VALUE VARCHAR2(4000);
BEGIN
req := utl_http.begin_request('http://www.5ienet.com/online.asp');
utl_http.set_header(req, 'Content-Type', 'text/html; charset=gb2312');
resp := utl_http.get_response(req);
dbms_output.enable(1000000);
LOOP
utl_http.read_line(resp, VALUE, TRUE);
dbms_output.put_line(VALUE);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
/
spool off
Ref: http://www.itpub.net/thread-826155-1-1.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12402/viewspace-1030291/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12402/viewspace-1030291/