I would like to send a POST request to php server (just like the html form above) with MidletPascal.
However, what I have tried did not work. I don't know why.
Assume the values I want to send is:
f_phone=84909674700
f_msg=hello
Here is what I tried:
htmlbody := 'f_phone=84909674700&f_msg=hello';
setHttpMethod(connect, POST);
if not openHttp(connect, 'http://dfreesms.com/in.php') then halt;
addHttpHeader(connect, 'User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0');
addHttpHeader(connect, 'Content-Type','application/x-www-form-urlencoded');
addHttpHeader(connect, 'Content-Length', integertoString(length(htmlbody)));
addHttpBody(connect, htmlbody);
if sendHttpMessage(connect) <> 200 then halt;
closeHttp(connect);
After I send that request, the server return a page just like I didn't send anything to it (no SMS sent).
Please help me!
I have a html form like this:
I would like to send a POST request to php server (just like the html form above) with MidletPascal.
However, what I have tried did not work. I don't know why.
Assume the values I want to send is:
Here is what I tried:
After I send that request, the server return a page just like I didn't send anything to it (no SMS sent).
The GET method not work with this site! So the URL http://dfreesms.com/in.php?f_phone=84909674700&f_msg=hello will not work!
Please help me find out what wrong with my code! Please!
Thanks.
I repost the html source
The html works but my midlet not work at all. If I worked, you could send free SMS from your phone with this:
http://www.mediafire.com/download.php?wpnqqxu49txd1ad
Tell me if it works for you!
Here is the link to the html source above: http://tempsms.cu.to