Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check a user is using wifi or cellular data in php

<html>
    <head>
        <script type="text/javascript">
            function checkWIFI() {
                var output = document.getElementById('connectionCheck');
                var html = "Checking...<br/>Connection: ";
                if (navigator.connection) {
                    var type = navigator.connection.type;
                    html += type
                } else {
                    html += "Connection type not supported.";
                }
                output.innerHTML = html;
            }
        </script>
    </head>
    <body onload="checkWIFI();">
        <div id="connectionCheck">
        </div>
    </body>
</html>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #user #wifi #cellular #data #php
ADD COMMENT
Topic
Name
4+8 =