Get an Image over http with the package utl_http
Date: Sat, 21 Jul 2001 21:49:02 GMT
Message-ID: <3b1cb453_at_194.120.211.23>
Hello,
my problem:
i have to save a jpg-image into my temp-directory (C:\temp). the image is
only accessible via http-interface, with an url like:
http://.../FM_IDBRO.DLL/GetJPEGImage?AC1=7733&AC2=4127&AC3=2713&AC4=1542&GLB
IMGID=62503&IMGTYP=2
i am trying to access the interface with the UTL_HTTP-package. Example:
create or replace procedure bildtest (pi_url IN varchar2) is
x utl_http.html_pieces;
BEGIN
x:= utl_http.request_pieces(pi_url, 100);
dbms_output.put_line(x.count || ' pieces were retrieved.');
dbms_output.put_line('with total length ');
IF x.count<1
THEN
dbms_output.put_line('0');
ELSE
dbms_output.put_line ((2000*(x.count-1)) + length(x(x.count)));END IF;
END;
/
output:
1 pieces were retrieved.
with total length
utl_http.html_pieces is table of varchar2(2000); my picture has a size of 20 kb, so normally i should get more than one piece. if i use an url to an html-site, i get a correct output:
4 pieces were retrieved.
with total length
7617
also i can access the html-data, but i can't get the jpeg-data.
My Questions:
Are there any other functions or datatypes in utl_http avaiable to solve my
problem (i cant find more in the manuals)?
If not: Can I solve it with the utl_tcp-package and has anyone an idea?
THANKS FOR HELPING
Stefan Neumann
Received on Sat Jul 21 2001 - 23:49:02 CEST