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.