Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PostURL

Status
Not open for further replies.

Jsmith54088

Programmer
Mar 25, 2009
3
SG
Hi good folks, need help. I'm having problem with doing a HTTP post of a CGI command that is sent to a SMS server. This is what I have done:

Create n_ir_msgbox object from InternetResult Object. There is no extra coding inside, do I need to add any scripts in it?

Declare instance variable:
inet iinet
n_ir_msgbox iir_msgbox

My main script:

===========================================================

Blob lblb_args
String ls_headers
String ls_url
Long ll_length
Integer li_rtn

iir_msgbox = CREATE n_ir_msgbox
iinet = CREATE inet

lblb_args = blob("")
ll_length = Len(lblb_args)

ls_headers = "Content-Length: " + String(ll_length) + &
"~n~n"

ls_url = " &
tar_num=91234567&tar_msg=This is the test message."

li_rtn = iinet.PostURL(ls_url, lblb_args, ls_headers, 80, iir_msgbox)

MessageBox("Return Value", li_rtn)

DESTROY iir_msgbox
DESTROY iinet

===========================================================

I'm getting a return value of -1 and apparently my http post is not working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top