Announcement

Collapse
No announcement yet.

Problem in function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem in function

    I wrote this function to send sms:
    Code:
    function Send(Username, Password, FromNumber, ToNumber, SMSText, FlashMode, ProxyData, Port, TimeOut)
    
    	if not ProxyData then ProxyData = nil end
    	if not Port then Port = 80 end
    	if not TimeOut then TimeOut = 20 end
    	if FlashMode then FlashMode = 1 else FlashMode = 0 end
    	local res = nil
    	
    		Vars = {username = Username,password = Password,from = FromNumber,to = ToNumber,text = SMSText,flash = FlashMode}
    		res = HTTP.SubmitMultipart("http://mysite.com/Send.php", Vars, SUBMITWEB_POST, TimeOut, Port, nil, ProxyData);
    	
    	return res
    end
    But when I use it, no value that I wrote in Vars was not send to the server (Send.php file)!

    Is there anybody to help me? (I use HTTP action plugin)

  • #2
    Originally posted by mslight13 View Post
    I wrote this function to send sms:
    Code:
    function Send(Username, Password, FromNumber, ToNumber, SMSText, FlashMode, ProxyData, Port, TimeOut)
    
    	if not ProxyData then ProxyData = nil end
    	if not Port then Port = 80 end
    	if not TimeOut then TimeOut = 20 end
    	if FlashMode then FlashMode = 1 else FlashMode = 0 end
    	local res = nil
    	
    		Vars = {username = Username,password = Password,from = FromNumber,to = ToNumber,text = SMSText,flash = FlashMode}
    		res = HTTP.SubmitMultipart("http://mysite.com/Send.php", Vars, SUBMITWEB_POST, TimeOut, Port, nil, ProxyData);
    	
    	return res
    end
    But when I use it, no value that I wrote in Vars was not send to the server (Send.php file)!

    Is there anybody to help me? (I use HTTP action plugin)
    Why you not just using the standard Submit also have you added some debugging to the php side of things to make sure that its not getting anything maybe have it save it to log file when your testing.

    Your question is very vag and really without seeing your php side and the lua side no real way to help you as your asking about two lots of different lanuages here.
    Last edited by kingzooly; 05-01-2015, 02:15 AM. Reason: Update
    Plugins or Sources MokoX
    BunnyHop 2021 Here

    Comment


    • #3
      Originally posted by kingzooly View Post
      Why you not just using the standard Submit also have you added some debugging to the php side of things to make sure that its not getting anything maybe have it save it to log file when your testing.

      Your question is very vag and really without seeing your php side and the lua side no real way to help you as your asking about two lots of different lanuages here.
      kingzooly, Thanks for your reply.
      standard Submit function causes application sleep and seems the program in not responding.

      The PHP file that I trying to POST values to it, was wrote by a company that provides sms panel web service.

      Comment


      • #4
        Originally posted by mslight13 View Post
        kingzooly, Thanks for your reply.
        standard Submit function causes application sleep and seems the program in not responding.

        The PHP file that I trying to POST values to it, was wrote by a company that provides sms panel web service.
        If your sending the right vrbs to the script I can't see what the problem would be, also I would let the app lock up as you don't want to app able to send the request many times it could create server problems.

        you can add a simple loading or connecting message to the end user AMS is single threaded yes but this is not aways a bad thing, deff when it comes to requests to a server.
        Plugins or Sources MokoX
        BunnyHop 2021 Here

        Comment

        Working...
        X