The Android mobile phone of "little lazy worm" controls computer shutdown, and the android

Source: Internet
Author: User

The Android mobile phone of "little lazy worm" controls computer shutdown, and the android

Background

For many nights, when I lie in bed and listen to the music on my computer, I can't open my eyes, and my sleep comes up, I often don't want to turn off the lights or my computer at this time, because it is very likely that I will not be able to sleep, and I have a spirit, so I want to write something that can be controlled by a mobile phone to turn off the lights and computers. Today, the weather in Shanghai is very hot. reading a book is really hard to read. Let's knock on the program and then there will be a "little lazy ".

Solution

When I write this software, I think about two solutions, such




The reason for solution 2 is that I couldn't think of how to use the mobile APP to get the IP address of the server running on the computer. I couldn't get up and check the IP address of the server, and then enter the IP address to shut down, in that case, I would be a little cool, and I had to write another PHP program. The weather was so hot, my notebook was always automatically shut down, and finally I chose solution 1.

Run

The Desktop client uses C # To enable startup.


The Android phone interface is relatively simple, just a button.


Key Points

The mobile APP obtains the IP address of the computer server. The mobile phone sends ping commands to obtain the IP addresses in the LAN, and then sends shutdown commands to these IP addresses and fixed ports respectively. After receiving the shutdown command, the server replies and executes the command.

No, the meeting is not difficult, and the code is simple. I forgot to buy cigarettes, and I didn't sell them any more. Please hurry up, Ann

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.