Questions about PHP sending text messages to your phone

Source: Internet
Author: User
Questions about PHP sending SMS to phone!
Two programs in DEDE to send a text message to inform the user,

Send functions such as:

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: (number I will not public ha ... Lest the country be scolded every day.


SENDMB ("13#10101###", "Fuck", "Baby", "abc123");



But after the operation did not respond, how to solve?

------Solution--------------------
Paid transactions have been done before, login complaints used. The page encoding is also required, you look carefully,
  • 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.