Home » Developer & Programmer » Forms » Sending Sms From Oracle data base Using Cellular mobile company API (merged 2) (oracle 11gR2)
Sending Sms From Oracle data base Using Cellular mobile company API (merged 2) [message #677620] Tue, 01 October 2019 07:41 Go to next message
Ace Mirxa
Messages: 9
Registered: March 2019
Junior Member
Dear experts ,

i want to send sms from oracle to mobile number using 3rd party cellular netowrk's api from 11GR2.
and want to access this link using plsql procedure
link "https://telenorcsms.com.pk:27677/corporate_sms2/userProfile.jsp"

if it is possible in oracle using pl sql then kindly give me meaningful solution or any idea.

Thanks in Advance.

here is the code that i am using to access the url.

set define off;
DECLARE

HTTP_REQ UTL_HTTP.REQ;
HTTP_RESP UTL_HTTP.RESP;
URL_TEXT VARCHAR2(32767);
URL VARCHAR2(2000);
p_wallet_path varchar2(32767);
p_wallet_password varchar2(10);
SMS_MSG VARCHAR2(160) := 'Congratulations! Your database has been configured propoerly for sending SMS through a 3rd party SMS Gateway';

BEGIN

UTL_HTTP.set_wallet('file:D:\Oracle\Middleware\Oracle_FRHome1\wallet1', 'oracle786');

DBMS_OUTPUT.ENABLE(1000000);

url := 'https://telenorcsms.com.pk:27677/corporate_sms2/api/sendsms.jsp?session_id=f6feaeee8fb24e658e5cffb504286f51&to=923XXXXXXX';

HTTP_REQ := UTL_HTTP.BEGIN_REQUEST(URL,'Host','HTTP/1.0');

UTL_HTTP.SET_HEADER(HTTP_REQ, 'User-Agent', 'Internet Explorer/11.0.155');
HTTP_RESP := UTL_HTTP.GET_RESPONSE(HTTP_REQ);

-- 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 dbms_output.put_line(sqlerrm);
END;
END LOOP;

UTL_HTTP.END_RESPONSE(HTTP_RESP);
END;
Sending Sms From Oracle data base Using Cellular mobile company API [message #677621 is a reply to message #677620] Tue, 01 October 2019 07:42 Go to previous messageGo to next message
Ace Mirxa
Messages: 9
Registered: March 2019
Junior Member
Dear experts ,

i want to send sms from oracle to mobile number using 3rd party cellular netowrk's api from 11GR2.
and want to access this link using plsql procedure
link "https://telenorcsms.com.pk:27677/corporate_sms2/userProfile.jsp"

if it is possible in oracle using pl sql then kindly give me meaningful solution or any idea.

Thanks in Advance.

here is the code that i am using to access the url.

set define off;
DECLARE

HTTP_REQ UTL_HTTP.REQ;
HTTP_RESP UTL_HTTP.RESP;
URL_TEXT VARCHAR2(32767);
URL VARCHAR2(2000);
p_wallet_path varchar2(32767);
p_wallet_password varchar2(10);
SMS_MSG VARCHAR2(160) := 'Congratulations! Your database has been configured propoerly for sending SMS through a 3rd party SMS Gateway';

BEGIN

UTL_HTTP.set_wallet('file:D:\Oracle\Middleware\Oracle_FRHome1\wallet1', 'oracle786');

DBMS_OUTPUT.ENABLE(1000000);

url := 'https://telenorcsms.com.pk:27677/corporate_sms2/api/sendsms.jsp?session_id=f6feaeee8fb24e658e5cffb504286f51&to=923XXXXXXX';

HTTP_REQ := UTL_HTTP.BEGIN_REQUEST(URL,'Host','HTTP/1.0');

UTL_HTTP.SET_HEADER(HTTP_REQ, 'User-Agent', 'Internet Explorer/11.0.155');
HTTP_RESP := UTL_HTTP.GET_RESPONSE(HTTP_REQ);

-- 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 dbms_output.put_line(sqlerrm);
END;
END LOOP;

UTL_HTTP.END_RESPONSE(HTTP_RESP);
END;
Re: Sending Sms From Oracle data base Using Cellular mobile company API [message #677626 is a reply to message #677621] Tue, 01 October 2019 08:45 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
simple use its api like that
http://sms.smssoft.net/web_distributor/api/sms.php?username=*********&password=***&sender=BrandName&mobile=9230022222&message=TestSMS
Re: Sending Sms From Oracle data base Using Cellular mobile company API [message #677627 is a reply to message #677626] Tue, 01 October 2019 08:47 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
https://community.oracle.com/thread/4293993
Previous Topic: CALCULATE TIME
Next Topic: Sending Email through Oracle Forms 6i
Goto Forum:
  


Current Time: Thu Mar 28 06:52:37 CDT 2024