How to disable a computer (computer) by using a mobile phone in php

Source: Internet
Author: User
Tags php web development
This article describes how to use php to disable a computer (computer) by using a mobile phone. it involves the related skills of php to use the system method to call system commands, for more information, see the example in this article. Share it with you for your reference. The specific analysis is as follows:

Suitable for php web development with mobile phones and computers and wifi. Easy to close your computer (especially when you want to go to bed), suitable for LAN

Usage: in your web project folder, you can create a new directory.

By the way, add your apache httpd or iis to the firewall. the file is a php suffix.

 Computer-manager 

<? Php if ($ _ POST) {$ shutdown = array ('shutdown '=> 'shutdown-s-t 0', 'restart' => 'shutdown-R ', 'logout' => 'shutdown-L',); $ cmdk =$ _ POST ['cmd']; echo $ cmd = $ shutdown [$ cmdk]; system ($ cmd); // execute the operation}?>

I hope this article will help you with php programming.

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.