Answer the question
In order to leave comments, you need to log in
How to send SMS without submitting a form?
I apologize for the stupid question
. In general, I try to use the smsc.ru
service.
It sends messages to phones (in short), in order to use it, you need to transfer some data using the POST or GET method, and it seems to return a line with data (a confirmation code, for example)
Well , the question is how to get this data on the page, in fact ...
I'm stupid and just through action = " https://smsc.ru/sys " I can send, but it goes to that page, it displays the data that I need , but I don’t know how to get it, I know
a little about ajax , but I didn’t understand how to call this https://smsc.ru/sys
from it
I also tried with curlfigure it out, probably there and need to dig?
They also have something like a library in one file that is easy to use for
example:
list($sms_id, $sms_cnt, $cost, $balance) = send_sms("79999999999", "", 0, 0, 0, 3, false);
Answer the question
In order to leave comments, you need to log in
They themselves said that there is a library.
Use it https://smsc.ru/api/code/libraries/http_smtp/php/#menu
_
I also tried to figure it out with curl, probably I need to dig there?yes, that's where it's needed. See examples of working with curls, there are many of them, easy to google. You can stupidly connect their library, as Sergey delphinpro advises , which immediately gives ready-made functions for all basic actions from the api service.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question