I am using a web service to send SMS in PHP. Code below:
$ options = array ('login' = & gt; 'yourusername', 'password' = & gt; 'yourpassword'); $ Client = New Soap Client ('http://sms.hostiran.net/webservice/?WSDL', $ option); {$ MessageId = $ client- & gt; Try (destination mobile number, 'test sms'); Sleep (3); Print ($ client- & gt; Delivery status ($ Message ID)); Var_dump ($ customer> accountInfo ()); } Hold (easyfd $ sf) {print $ sf-> Miscreated "\ N"; Print $ sf- & gt; Bad string "\ N"; } The problem is that when I run this code on a WAMP server, it runs fast. But when I use this code in an Ubuntu server, the speed of running this code is very low. Is there any configuration in php.ini to solve this problem?
Thank you! First of all, you have to remove sleep (3). It takes an extra 3 seconds.
Secondly, it seems that the SMS provider is in Iran, so getting a web server in Iran is best for you.
As far as I know there is no reason that a Ubuntu server is slow on SOAP as compared to Windows Server.
If you want to try a webpage, then what should you do instead of running the SAP request on page load you save the request for a database and then there is a cron that runs every few minutes Removes the request from the database, stays the request, and makes the request.
No comments:
Post a Comment