login about faq

I read t-sql code on your website and trying very hard to call a json webservice but in-vain.

http://api.sendsms.pk/sendsms/YOUR-SECRET-API-KEY.json Accepts three parameters by HTTP POST request (phone = phone number to which the sms will be sent, msg = message, type = 0 for regular and 1 for flash sms) to send sms.

Declare @Object as Int; Declare @ResponseText as Varchar(8000); DECLARE @login VARCHAR(50); DECLARE @user_passwd VARCHAR(50)

Exec master..sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;

--Exec master..sp_OAMethod @Object, 'open', NULL, 'get', 'http://api.sendsms.pk/isValid/d1d00f8090d2b09ad260.json', 'false' --Exec master..sp_OAMethod @Object, 'open', NULL, 'get', 'http://api.geonames.org/citiesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=demo', 'false' Exec master..sp_OAMethod @Object, 'open', NULL, 'POST', 'http://api.sendsms.pk/sendsms/d1d00f8090d2b09ad260.json', 'false'

EXEC master..sp_OASetProperty @Object, 'phone', '03214040362' EXEC master..sp_OASetProperty @Object, 'msg', 'Testing is going on.' EXEC master..sp_OASetProperty @Object, 'type', 0

Exec master..sp_OAMethod @Object, 'send' Exec master..sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT Select @ResponseText as ResponseText Exec master..sp_OADestroy @Object

above api return {"result":"false","message":"You have not written any message. Please write something to send."}

asked Sep 04 '12 at 07:54

Nauman's gravatar image

Nauman
1111


How is this question related to a Chilkat API? This forum is for Chilkat related questions, not general-purpose programming relating to anything and everything..

link

answered Sep 04 '12 at 13:19

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×1

Asked: Sep 04 '12 at 07:54

Seen: 3,435 times

Last updated: Sep 04 '12 at 13:19

powered by OSQA