Questions about sending text messages to mobile phones in php! In DEDE, two programs are used to send text messages to users. the function is functionsendmb ($ mobile, $ c, $ name, $ pwd) {$ URL & quot; 218.241.153.202: 8888post_sms.do & quot; $ post_data [corp_ I questions about how php sends text messages to mobile phones!
Two programs in DEDE need to send text messages to users,
The sending function is as follows:
Function sendmb ($ mobile, $ c, $ name, $ pwd)
{
$ URL = "http: // 218.241.153.202: 8888/post_sms.do ";
$ Post_data ['corp _ id'] = "309090 ";
$ Post_data ['User _ id'] = $ name;
$ Pwd. = "td ";
$ Pwd = md5 ($ pwd );
$ Post_data ['md5 _ td_code '] = $ pwd;
$ Post_data ['mobile'] = $ mobile;
$ Post_data ['MSG _ content'] = $ c;
$ Post_data ['mesg _ id'] = "";
$ Post_data ['extend'] = "";
$ URL_Info = parse_url ($ URL );
Foreach ($ post_data as $ key => $ value)
{
$ Values [] = "{$ key} =". urlencode ($ value );
}
$ Data_string = implode ("&", $ values );
$ URL_Info ['port'] = 8888;
$ Request. = "POST". $ URL_Info ['path']. "HTTP/1.1 \ n ";
$ Request. = "Host:". $ URL_Info ['host']. "\ n ";
$ Request. = "Referer:". $ referrer. "\ n ";
$ Request. = "Content-type: application/x-www-form-urlencoded \ n ";
$ Request. = "Content-length:". strlen ($ data_string). "\ n ";
$ Request. = "Connection: close \ n ";
$ Request. = "\ n ";
$ Request. = $ data_string. "\ n ";
$ Fp = fsockopen ($ URL_Info ['host'], $ URL_Info ['port']);
Fputs ($ fp, $ request );
While (! Feof ($ fp ))
{
$ Result. = fgets ($ fp, 1024 );
}
Fclose ($ fp );
$ Ret = explode ("close", $ result );
Return trim ($ ret [1]);
}
Call: (I will not disclose the number, haha... so that I won't be scolded every day)
Sendmb ("13 #10101 ###", "fuck ass", "baby", "abc123 ");
But it does not respond after running. how can this problem be solved?
------ Solution --------------------
I have made payment transactions before, and I have used it for login complaints. Page encoding is also required. take a closer look,