Real-Time Web Interface to MQTT using Socket.io and Node.js First, all credit for this tutorial goes to Robert Hekkers Blog . I've altered it slightly to pick up newer versions of the various javascript libraries. If you've followed along with my earlier post , you now have MQTT running on your Raspberry Pi, and an Arduino IoT client that can publish and subscribe to MQTT packets. The next step is developing a real-time web interface that can control your MQTT network. Why Socket.io and Node.js? Web browsers typically operate by pulling data from a server when you click on a link. Servers don't usually keep an open connection to the browsers it has serviced, so if some event happens on the server side, the server cannot push that event to your browser, unless you refresh the page. That's where Socket.io comes in handy. Socket.io maintains an open connection between the server and the browser, which enables the server to push updates to the bro...
In this post i have explain about how to implement New user registration with email verification script. if your using register form in a website, you need to use email verification because it will be reduce spam register user and make sure you will get correct registered user in your website. Live Demo Download Database Create sample table called as 'users' and create below columns that table. CREATE TABLE IF NOT EXISTS `users` ( `id` int ( 11 ) NOT NULL AUTO_INCREMENT, `email` varchar ( 100 ) NOT NULL , `name` varchar ( 250 ) NOT NULL , `password` varchar ( 250 ) NOT NULL , `active_code` varchar ( 300 ) NOT NULL , PRIMARY KEY ( `id` ) ) HTML Create simple form element < html > < body > < form method = "post" > < label > Email * </ label > < input type = "text" name = "email" > < label > Password * ...
In this article shows the usage of PHP_SELF variable and how to avoid PHP_SELF exploits. What is PHP_SELF variable? PHP_SELF is a variable that returns the current script being executed. This variable returns the name and path of the current file (from the root folder). You can use this variable in the action field of the FORM. There are also certain exploits that you need to be aware of. We shall discuss all these points in this article. We will now see some examples. echo $_SERVER['PHP_SELF']; a) Suppose your php file is located at the address: http://www.yourserver.com/form-action.php In this case, PHP_SELF will contain: "/form-action.php" b) Suppose your php file is located at the address: http://www.yourserver.com/dir1/form-action.php For this URL, PHP_SELF will be : "/dir1/form-action.php" Using the PHP_SELF variable in the action field of the form A common use of PHP_SELF variable is in the action field of the <form> tag....
Comments
Post a Comment