Questions about sending text messages to mobile phones using php-php Tutorial

Source: Internet
Author: User
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,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.