Oracle Database Sms Gateway
Oracle Database Sms Gateway
SMS Gateway
You may wrap the entire procedure and call it against a table
trigger or through a button click available with user form(s)
DECLARE
HTTP_REQ UTL_HTTP.REQ;
HTTP_RESP UTL_HTTP.RESP;
URL_TEXT VARCHAR2(32767);
URL VARCHAR2(2000);
BEGIN
DBMS_OUTPUT.ENABLE(1000000);
--Based on your service provider, the following link format may differ from
--What we have specified below!
URL :=
'http://yourwebsmsdomain.com/alerts/api/web2sms.php?username=demo&password=de
mo2&to=95xxxxxxx&sender=ODBSMS&message='||
UTL_URL.Escape(SMS_MSG,TRUE);
--UTL_URL.Escape manages escape characters like SPACE between words in a
message.
HTTP_REQ := UTL_HTTP.BEGIN_REQUEST(URL);
-- Process Request
LOOP
BEGIN
URL_TEXT := null;
UTL_HTTP.READ_LINE(HTTP_RESP, URL_TEXT, TRUE);
DBMS_OUTPUT.PUT_LINE(URL_TEXT);
EXCEPTION
WHEN OTHERS THEN EXIT;
END;
END LOOP;
UTL_HTTP.END_RESPONSE(HTTP_RESP);
END;