Re: php code from plsql using owa htp.p
Date: 2 Mar 2006 14:01:38 -0800
Message-ID: <1141336897.983332.86230_at_t39g2000cwt.googlegroups.com>
[Quoted] Yep, something missing ;).
The following sample should get you started, I just picked a random php-url from the web:
create or replace procedure test_utl_http is
req utl_http.req;
resp utl_http.resp;
value VARCHAR2(1024);
BEGIN
--utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com');
req :=
utl_http.begin_request('http://www.yessoftware.com/products/product_detail.php?product_id=1');
--utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
resp := utl_http.get_response(req);
LOOP
utl_http.read_line(resp, value, TRUE);
htp.p(value);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
/
grant execute on test_utl_http to public
/
Do some research on UTL_HTTP and how to use it. There are plenty of samples out there.
~Dietmar. Received on Thu Mar 02 2006 - 23:01:38 CET