1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

Detect wireless networks with JS/php code?/

Discussion in 'General Scripting Chat' started by Mediawiz, Oct 11, 2018.

  1. Mediawiz

    Mediawiz Jr. VIP Jr. VIP

    Joined:
    Apr 19, 2016
    Messages:
    418
    Likes Received:
    403
    Occupation:
    Building spaceships
    Location:
    Space
    Hi,

    Is there any way to detect wireless networks with Javascript/php/other web code?

    For one of my projects i'd like to display the networks around my user but I can't really find a solution.

    Thanks.
     
  2. Ashraf09

    Ashraf09 Newbie

    Joined:
    Jun 29, 2013
    Messages:
    41
    Likes Received:
    7
    Gender:
    Male
    Occupation:
    IT
    Location:
    Morocco
    Home Page:
    if using lunix you can try http://php.net/manual/en/function.shell-exec.php
    to execute system commands, compiled with (nmcli), you'll get result you want
     
  3. maidanez

    maidanez Registered Member

    Joined:
    Dec 16, 2018
    Messages:
    56
    Likes Received:
    26
    Gender:
    Male
    Home Page:
    On the javascript side, and probably a little bit easier to use, google wifi-control for node js.
     
  4. alain12

    alain12 Registered Member

    Joined:
    Feb 15, 2019
    Messages:
    98
    Likes Received:
    51
    You want to create a web page that scans and displays the wifi networks around the user who's browsing your site? That's not possible.

    With php, the code runs server-side so you cannot detect the user's wifi networks, only those around the server (assuming it has access to a wifi adapter)

    With client-side javascript, that can't be done. Unless you use Node.js, but that runs server-side just like php.
     
  5. triplecheeze

    triplecheeze Newbie

    Joined:
    Sep 23, 2014
    Messages:
    22
    Likes Received:
    3
    With browserify you could run nodejs stuff on clientside
     
  6. maidanez

    maidanez Registered Member

    Joined:
    Dec 16, 2018
    Messages:
    56
    Likes Received:
    26
    Gender:
    Male
    Home Page:
    No you can't. You can convert the code to run in the browser but it won't have access the underlying subsystem that node.js has. There will be a lot of missing system calls you can perform on node.js that don't work in a browser.
     
  7. FatBee

    FatBee Jr. VIP Jr. VIP

    Joined:
    Apr 4, 2015
    Messages:
    1,286
    Likes Received:
    697
    Gender:
    Male
    You gotta be kidding me? And all the answers with possible solution.

    Client side javascript has limited access to what you can do. So that's trigger my I HAVE NO CLUE WHAT IM DOING alert.