Book and website text message solution sent by sery

Source: Internet
Author: User

Today sery (http://sery.blog.51cto.com/) on QQ said to send me a book he just wrote "Internet operation intelligence", because it cited a piece of program I wrote.

#! /Usr/bin/perl-W <br/> use strict; <br/> Use lwp: simple; <br/> Use URI: escape; <br/> Use Digest: MD5; </P> <p> my ($ mobile, $ content) = @ argv; <br/> my $ log_control = 1; <br/> my $ key = 'xxxxxx'; <br/> my $ souce_content = substr ($ mobile, 0, 8 ). substr ($ mobile,-10, 10 ). $ key; </P> <p> my $ MD5 = Digest: MD5-> New; <br/> $ MD5-> Add ($ souce_content ); <br/> my $ result_conent = UC ($ MD5-> hexdigest); <br/> my $ url = "HT TP: // http.asp.sh.cn/mt.do? Username = sery & Password = xxxxxx & mobile = $ mobile & content = $ content & keyword = $ result_conent "; <br/> my $ result = get $ URL; <br/> if ($ log_control) {<br/> my $ FH; <br/> open ($ FH, '>/var/log/SMS. log ') or die "can't open log: $! "; <Br/> Print $ FH join ('', time, $ result, "/N"); <br/> close $ FH; <br/>}< br/> 

This program is very simple, it was written about two years ago, and its function is very simple, that is, the server accesses a URL address to send text messages.

Many Internet companies now provide such short message platforms to solve the problem of sending text messages to websites. For example, if your website needs to subscribe to mobile phone messages, this solution is likely to be used. The following describes two platforms:

1. A free SMS Platform Based on Mobile Feixin

Zhang Yan wrote a detailed article about this free API (http://blog.s135.com/fetion_api/), the biggest benefit of this method is free. However, there is a serious problem: You can only send text messages to friends on the flying mail, which obviously cannot meet the requirements of large-scale website sending. This method can be used if you need to send text messages to friends on a large scale or automatically.

2. Charged SMS Platform Based on a third-party platform

The service used in the above program is the text message platform provided by Tencent wireless (http://asp.sh.cn/), For details, see http://asp.sh.cn/solution_http.asp.

The basic process is to register an account-> recharge-> send text messages through the http api. The parameters include the user name, password, mobile phone number, key, and text message content. The cost of this method is not much different from that of a common text message. It is about 0.1 yuan. Many other companies also provide similar services, such as http://www.inolink.com/product_conn03.html.

The website's short message sending service is also very simple, and can be achieved through a simple trigger mechanism, listener mode, or regular crontab.

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.