Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
914 views
in Technique[技术] by (71.8m points)

sending url sms in php

Sending SMS url in my php class is working with the curl library. The problem is that if the url request is delayed (in CURLOPT_CONNECTTIMEOUT_MS or CURLOPT_TIMEOUT_MS), my site will be loaded for the user with a delay. What do you suggest? Should I run SMS url asynchronously? How do I do this? Or put a Schedule on the server? The problem with Schedule is that I want the SMS to be sent exactly when the user runs the script, so I can't set a timeline for Schedule to run in certain time. If the Schedule runing time is short, the database gets involved and I do not like this. In fact, I want to ask php to execute the Schedule after the user runs the script. How do I do this?

question from:https://stackoverflow.com/questions/65869937/sending-url-sms-in-php

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

so I asked myself how to tell the server computer that a new SMS event has occurred? (My computer operating system is Windows and I use xampp). I saved the text messages in the database. And for each text message I created a small empty file in a folder (smsevents) on the Windows server, With the same name that is stored in the database in the ip field for each SMS. And on the server I used the powershell to call a url when a new file is placed in the (smsevents) folder. That url contains the name of the newly created file. Then in this url, a record of the database in the SMS table is called, whose Ip field is the same as the name of the created file. And is sent to the SMS sending system, And url deletes the file created in the folder (smsevents). I created a .bat file that runs when the server is turned on and runs the powershell script. And it was done. I will write more details soon.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...