Shutdown Computer From Mobile Using PHP On the Internet there are some tutorials about shutting down a computer from a mobile phone.But, in this tutorial we'll check out a way to shutdown a computer from a mobile phone using PHP.For those who don't know PHP, it is a scripting language in simple words.We are PHP as it is a server side scripting language,platform independent and open source.That means we don't have to worry about whether the system runs on Windows or Linux.The procedure is really simple.All we have to do is to set up a server on the computer with PHP and execute system command to shutdown the computer. 1.SERVER SETUP We'll use XAMPP to set up the server.Believe me it is too easy. Go to xampp home page.Download the available package (installer or zip archive). Now,follow the instruction given on their site to install the server.Actually installation is just unzipping the archive to a directory.The installation will take just around 2 minute. However you check my previous post on setting up server on home computer. 2.PHP code
echo 'Shutting down'; exec("shutdown -s -t 30"); //30 means shutdown after 30 seconds ?> Go to no-ip.com and register a free sub-domain and point it to the the following http://YOUR-IP-ADDRESS/ To find out your ip address just visit any site like http://checkmyip.com/. That's it.Now you visit that link with no-ip subdomain from your mobile phone to shut down the computer. |
This tutorial will address the basic setup of a server on your own computer running with windows platform. This means the removal of hassles of dealing with the company that is running a remote web server. It will be easy to modify. You can add any thing you want to it, be it CGI/Perl, Zope, Roxen, etc, all by your self. You will have unlimited disk space, well at least as big as your hard disk drive . Now that you know the advantages, it is time that I tell you what you will need. You will need XAMPP 1.6.8 which is available for free & combines all of the following * Apache HTTPD 2.2.9 + Openssl 0.9.8i * MySQL 5.0.67 * PHP 5.2.6 * PHP 4.4.9 * phpMyAdmin 2.11.9.2 * FileZilla FTP Server 0.9.27 * Mercury Mail Transport System 4.52 STEP 1 : 1.I recommend to download Self-extracting 7-ZIP archive version because of its low size compared to other two versions. Download Link STEP 2: After downloading extract the archiveto folder of your choice.Don't panic if it halts for few minutes at some stage (may be at 27%,32% or81%) during extraction. Just be patient. Remember that XAMPP folder will be created automatically which meansyou don't need to create one. STEP 3 Now,loacate the file in the setup-xampp.bat in the XAMPP folder and run it. You will see something like this ::
STEP 4 XAMPP control Panel Run the file xampp-control.exe present in the folder XAMPP. The XAMPP Control Panel will appear. To have the Apache server and the MySQL database started upon the system startup, install them as services by checking the Svc checkboxes next to them. Then ckick OK in the XAMPP Control dialog box that opens. The Apache and MySQL servers are installed as services. To start the Apache HTTP server, click Start. To start the MySQL database server, click Start. Here are some more server scripts, you might find useful: STEP 5 Checking XAMPP Installation Open the URL http://localhost or http://127.0.0.1 in your browser .Click on the preferred language and you'll get this welcome screen for English. UNINSTALLATION:: Shut down the XAMPP server and exit all panels. If you installed any services, shut them down too. Simply delete the entire folder where XAMPP is installed. There are no registry entries and no environment variables to clean up… just simply good, clean code! Don’t forget to uninstall any services you might have installed. |
Tips & Tricks
Computer Tricks
Shutdown Computer From Mobile Using PHP/Create a Webserver in your home computer with PHP,MYSQL,APACHE in 5 Easy Steps
Next
« Prev Post
« Prev Post
Previous
Next Post »
Next Post »
Subscribe to:
Post Comments (Atom)
2 comments
Write commentsthanks the very nice blog post shutdown computer from mobile us helpful.
ReplyWeb Designing Courses In Chandigarh
Great explanation and thanks for sharing this information.
ReplyEmoticonEmoticon