{"id":5747,"date":"2023-07-17T14:41:54","date_gmt":"2023-07-17T06:41:54","guid":{"rendered":"https:\/\/blog.hoyo.idv.tw\/?p=5747"},"modified":"2023-07-17T14:41:54","modified_gmt":"2023-07-17T06:41:54","slug":"%e7%b6%b2%e8%b7%af%e7%b0%a1%e8%a8%8a-%e4%b8%ad%e8%8f%af%e9%9b%bb%e4%bf%a1","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=5747","title":{"rendered":"\u7db2\u8def\u7c21\u8a0a - \u4e2d\u83ef\u96fb\u4fe1"},"content":{"rendered":"<p>--<\/p>\n<h2>\u53c3\u8003\u8cc7\u6e90<\/h2>\n<ul>\n<li><a href=\"https:\/\/sms.hinet.net\/new\/sent_program.htm\" target=\"_blank\" rel=\"noopener\">HiNet \u4f01\u696d\u7c21\u8a0a<\/a><\/li>\n<\/ul>\n<p>--<\/p>\n<h2>\u5be6\u4f5c\/\u6ce8\u610f\u4e8b\u9805<\/h2>\n<ol>\n<li>include \u7684\u6a94\u6848\u8a18\u5f97\u5f9e .inc \u6539\u70ba .php<\/li>\n<li>port \u662f 8000\uff0c\u4f01\u696d\u7db2\u8def\u6709\u7ba1\u5236\u6642\u9700\u8981\u6ce8\u610f<\/li>\n<li>\u7c21\u8a0a\u5167\u5bb9\u4e0d\u5141\u8a31 10 \u500b\u9023\u7e8c\u6578\u5b57\uff0c\u5982\u679c\u662f\u624b\u6a5f\u865f\u78bc\u9700\u8981\u53e6\u5916\u8655\u7406<\/li>\n<\/ol>\n<pre class=\"lang:php decode:true\">&lt;?php\r\ninclude \"sms2.php\";\r\n\r\n\/* Socket to Air Server IP ,Port *\/\r\n$server_ip = '202.39.54.130';\r\n$server_port = 8000;\r\n$TimeOut=10;\r\n\r\n$user_acc = \"\u5e33\u865f\";\r\n$user_pwd = \"\u5bc6\u78bc\";\r\n$mobile_number = \"\u9580\u865f\";\r\n$message = \"\u7c21\u8a0a\u5167\u5bb9\uff0c\u4e2d\u82f1\u6df7\u5408\u6700\u9577\u53ef\u9054670\u500b\u5b57\";\r\n$message_encodeFrom = \"utf-8\"; \/\/\u8acb\u78ba\u8a8d\u7c21\u8a0a\u5167\u5bb9\u7de8\u78bc \"utf-8\" or \"big5\" or \"ucs-2\" or other encodings\r\n\r\n\/*\u5efa\u7acb\u9023\u7dda*\/\r\n$mysms = new sms2();\r\n$ret_code = $mysms-&gt;create_conn($server_ip, $server_port, $TimeOut, $user_acc, $user_pwd);\r\n$ret_msg = $mysms-&gt;get_ret_msg();\r\n\r\nif($ret_code==0){ \r\n      echo \"\u9023\u7dda\u6210\u529f\".\"&lt;br&gt;\\n\";\r\n       \/*\u5982\u6b32\u50b3\u9001\u591a\u7b46\u7c21\u8a0a\uff0c\u9023\u7dda\u6210\u529f\u5f8c\u4f7f\u7528\u8ff4\u5708\u57f7\u884c$mysms-&gt;send_long()\u5373\u53ef*\/\r\n      \/\/send_long(\u9580\u865f, \u578b\u614b:[1=\u7acb\u5373, 2=\u7acb\u5373+\u91cd\u9001\u903e\u6642, 3=\u9810\u7d04, 4=\u9810\u7d04+\u91cd\u9001\u903e\u6642], \u9810\u7d04\u6642\u9593, \u91cd\u9001\u903e\u6642, \u7c21\u8a0a\u5167\u5bb9)\r\n      $ret_code = $mysms-&gt;send_long($mobile_number, 1 , \"\" , 0 ,$message, $message_encodeFrom);\r\n      $ret_msg = $mysms-&gt;get_ret_msg();\r\n      if($ret_code==0){\r\n      \t echo \"\u7c21\u8a0a\u50b3\u9001\u6210\u529f\".\"&lt;br&gt;\";\r\n         echo \"ret_code=\".$ret_code.\"&lt;br&gt;\\n\";\r\n         echo \"ret_msg=\".$ret_msg.\"&lt;br&gt;\\n\";\r\n      }else{\r\n      \t echo \"\u7c21\u8a0a\u50b3\u9001\u5931\u6557\".\"&lt;br&gt;\\n\";\r\n         echo \"ret_code=\".$ret_code.\"&lt;br&gt;\\n\";\r\n         echo \"ret_msg=\".$ret_msg.\"&lt;br&gt;\\n\";\r\n      }\r\n} else {  \r\n      echo \"\u9023\u7dda\u5931\u6557\".\"&lt;br&gt;\\n\";\r\n      echo \"ret_code=\".$ret_code.\"&lt;br&gt;\\n\";\r\n      echo \"ret_msg=\".$ret_msg.\"&lt;br&gt;\\n\";\r\n}\r\n\r\n\/*\u95dc\u9589\u9023\u7dda*\/\r\n$mysms-&gt;close_conn();<\/pre>\n<p>--<\/p>\n<h2>\u5c07\u9023\u7e8c\u6578\u5b57\u4e2d\u9593\u52a0\u4e00\u500b\u6e1b\u865f<\/h2>\n<pre class=\"lang:php decode:true\">$content = preg_replace('\/(\\d{4})(\\d{6})\/', '$1-$2', $content);<\/pre>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"5747\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;5,027&nbsp;total views, &nbsp;1&nbsp;views today<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>-- \u53c3\u8003\u8cc7\u6e90 HiNet \u4f01...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"5747\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;5,027&nbsp;total views, &nbsp;1&nbsp;views today<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[31],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/5747"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5747"}],"version-history":[{"count":2,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/5747\/revisions"}],"predecessor-version":[{"id":12394,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/5747\/revisions\/12394"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}