Jump to content

Connecting to wifi using log-in page


enil14someone

Recommended Posts

hello,

 

uhm, im trying to make a log-in page that will connect to the areas wifi. i can make a log-in page using php and mysql but i was wondering how to make so that when the user "logs in" he/she will be connected to a certain areas wifi.

 

for example, our school has a wifi hot spot in which, when you try to connect to it your'e sent to a log-in page to determine whether your'e a student (or facilitator). if you are, once you log - in your'e sent to google page and then you can use the schools wifi. if you aren't then you can't connect to it. 

 

so now my question is how to i make a log-in page that will allow a user to connect to wifi? do i have to contact the company (the one that manages web servers like pldt) for permission? are there any policies regarding this? can it be coded using php and others?

 

if you can tell me then please do. thank you in advance :)

Link to comment
Share on other sites

I'm pretty well versed in networking technology, but I'm no expert. I think you are misunderstanding what is happening. A web page can't "connect" you or redirect you to a wifi network. You have to already be connected to the wifi network to access the login page.

 

This is what is likely happening:

 

You connect to the Wifi network. The router identifies that you are a new 'user' on the network and puts your IP in a restricted access mode. Any request you make over the network is redirected to the login page. Once you complete the login/confirmation process the router will allow your requests to go to the intended destination (e.g. Google).

 

So what you are asking is possible, but comes with several caveats. I know my router allows me to create guest access and will direct users to a login page. But, that page is controlled by the logic in the router's firmware. I.e. I don't control the look and feel of the page and it only checks for a global password that is set through the router's firmware. What I think you need is the ability to have the router redirect the user to a custom page you create so you can authenticate users via parameters you choose (e.g. verify the users identity from a separate database). My router my have that capability, but I don't know and don't care to investigate. If you are using an off-the-shelf router you will want to hit up the manufacturer's site to see if this capability exists.

Edited by Psycho
  • Like 1
Link to comment
Share on other sites

I don't think this is a networking issue. You have to already be connected to the network in question in order to implement what you want. There is no way for a web page to connect a computer to a different network. You need to have your router redirect users to a page where you will run the logic to determine if the user is "authorized" or not. This is what you would see in a public Wifi. Sometimes you just need to accept some Terms of user and sometimes you need some sort of authentication (e.g. room number and name). I assume the page used for that simply passes back a confirmation to the router in some manner. So, you can probably do this with just PHP, but you would need to know how to configure the router to use your custom page and what data your page would receive and need to pass back to the router. Not to mention, the router would have to support that functionality in the first place.

 

Apparently this functionality is referred to as "Captive Portal"

 

Here are a few links that may help:

 

http://www.bleepingcomputer.com/forums/t/506654/help-wifi-custom-login-page/

http://www.wi-fiplanet.com/tutorials/print.php/3730746

http://www.pcworld.com/article/2031443/how-to-set-up-public-wi-fi-at-your-business.html

Edited by Psycho
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.