Code for automatically sending text messages to new comments using ASP

Source: Internet
Author: User

I 'd like to write this one myself Program However, WordPress is Php, and my blog is ASP, so I have to use ASP to write Code . After some tossing tests, I finally turned my dream into reality.
The procedure of the program is as follows. When someone makes a comment, the comment will be sent to my mobile phone. The information is sent through the API interface of a website, actually, it is the API of Feixin. Can I send a message to myself? The principle is actually very simple.
Reminder: You must activate the fetion function on your mobile phone.

Example:

==== A. asp ====Copy codeThe Code is as follows: <form name = "form2" Action = "OK. asp? Id = 1 method = "Post">
<Textarea id = "content" style = "width: 60%; Height: 70px" name = "liuyan" rows = "4" Cols = "75"> </textarea>
<Input type = "Submit" value = "publish" name = "GG">
</Form>

This is a form to submit a message

==== OK. asp ====Copy codeThe Code is as follows: dim C
C = request. Form ("liuyan ")
Set XMLHTTP = server. Createobject ("Microsoft. XMLHTTP ")
XMLHTTP. Open "get", "https://sms.api.bz/fetion.php? Username = your mobile phone number & Password = Feixin password & sendto = your mobile phone number & message = "& C &" ", false
XMLHTTP. Send ()

Receiving page
--------- End -----
Well, the code is basically like this. It's easy. But I tested it for more than an hour. In fact, this API can do many things well. This is just a small application. A bigger application can do something like whether the server is online or not. If the server or website cannot be accessed, a message will be sent, haha. Yes, like a website nanny.
The red font is the core code. I can't use a few of the Code to jump to the page. Either the jump fails or the page is displayed in full screen, which I don't want to see. In the end, I used a piece of code I used before. I thought it would not work. I couldn't think of it as soon as I put it on.

If you see thisArticlePlease post a comment to see if it is really stable, but don't post so much. I don't have much memory on my mobile phone. When it's full, it will go down.

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.