Connecting Multiple PC's to a Central System
Now you have started developing websites or web applications on your PC. You are now happy with what you are looking at in front of you- the design and its seemingly interactive functionalities. Great. That’s all what every developers are really after.
There are possibly some scenario that might have come across your mind, or that you might have long been trying. Well, it’s also possible you haven’t thought about them. This article will reveal them, and provide detailed explanation on how to get things working the way you want.
First, assuming you have developed a web application which requires many users to access your database or supply some kind of information to your computer, you can easily upload your application on a server online, in any hosting company, or in our recommended hosting service below, and you can easily achieve your target where anybody can access your application from any PC or browser across the globe. However, if all that you are building and designing is still on a local server, your localhost, and want to access it from a WI-FI enabled phone or from another PC, then this might at first seem impossible or challenging.
You may be wondering why you need to connect multiply PC’s or phone to your local application. Here are some few possible use cases:
You have developed an e-voting/e-registration application for use within a small group of people where you wouldn’t be needing to go online. A single computer might make the process very slow. You surely want to connect more computers to speed up the election processes
You have developed your application to be used on PC’s as well as mobile phones. You may want to view the exact look of your application on your mobile phone. You need access to your localhost application from your mobile device. That’s why you need to know how to connect to your localhost apps.
Without much ado, let’s go straight to the tutorial. I’m assuming you have already built a web application/website which is accessible through “localhost” or 127,0,0,1 or “127.0.0.1:8080” on the base/central system. By the base/central system, I mean the computer you have the project on. My assumptions also extend to the fact that you are using any of WAMP or LAMP as your underlying server, under the Windows 7/8 operating systems. (Please note that this is a sponsored post. If you need instruction on how to get this done in other operating systems, or want us to write a detailed tutorial on any other topic, please write to us at enquiries@eazeconcept.com)
To access your central computer from any other computer or mobile phone, you need to set up your central system to act as a router so that any other systems can connect to it. This is where we need to fire up the command prompt and set up a function called the windows netsh .
On windows 8, press the windows icon on your keyboard, usually beside “alt” and press ‘c’ alongside. A small tab pops up. Then press the key ‘a’. this will fire up the command prompt for admin. If you fire up the non-administrative command prompt, our command won’t work. So ensure you choose that of the admin. Click on ‘yes’ to give the necessary privilege. There you have, the command prompt is up, like this:
Now, type in the following code in the command prompt
netsh wlan set hostednetwork mode=allow ssid=myname key=yourpassword
Your ssid is the name that will appear in anyone’s WI-FI search. Key is your chosen password which must be more than 8 numbers or characters. After that, push enter on your keyboard. And you’ll be informed if successful or not. If not, read through the instruction given in the command prompt and retry. When you are done, You’ll receive a success information. Now, the router is set. The next thing is that you need to start it. To start it, type the following code in command prompt:
netsh wlan start hostednetwork
It will be started. Now turn on the wifi of the sytem you are trying to connect to your central PC. Search for the SSID you set up. You’ll see it. The password is the key you entered at the beginning of the setup. Great. You just connected to your PC from any device. Now the next questions is how do I access the page. On the central system, if you access your application through 127.0.0.1, for example, you can’t use the same ADDRESS ON THE CONNECTED DEVICE. This is because the IP address 127.0.0.1 is for the central system. To know the address the you need, type the following command in the command prompt:
Ipconfig
This will pop up a list of information. Note the IPv4 Address. That is your computer IP address. Type this IP address in the browser of your connected device. You should be directed to the application page.
Good luck!
If you need to stop the service, just type
netsh wlan stop hostednetwork
It will be stopped. Please note that you have to start this service anytime you want to use it.Now you have started developing websites or web applications on your PC. You are now happy with what you are looking at in front of you- the design and its seemingly interactive functionalities. Great. That’s all what every developers are really after.
There are possibly some scenario that might have come across your mind, or that you might have long been trying. Well, it’s also possible you haven’t thought about them. This article will reveal them, and provide detailed explanation on how to get things working the way you want.
First, assuming you have developed a web application which requires many users to access your database or supply some kind of information to your computer, you can easily upload your application on a server online, in any hosting company, or in our recommended hosting service below, and you can easily achieve your target where anybody can access your application from any PC or browser across the globe. However, if all that you are building and designing is still on a local server, your localhost, and want to access it from a WI-FI enabled phone or from another PC, then this might at first seem impossible or challenging.
You may be wondering why you need to connect multiply PC’s or phone to your local application. Here are some few possible use cases:
You have developed an e-voting/e-registration application for use within a small group of people where you wouldn’t be needing to go online. A single computer might make the process very slow. You surely want to connect more computers to speed up the election processes
You have developed your application to be used on PC’s as well as mobile phones. You may want to view the exact look of your application on your mobile phone. You need access to your localhost application from your mobile device. That’s why you need to know how to connect to your localhost apps.
Without much ado, let’s go straight to the tutorial. I’m assuming you have already built a web application/website which is accessible through “localhost” or 127,0,0,1 or “127.0.0.1:8080” on the base/central system. By the base/central system, I mean the computer you have the project on. My assumptions also extend to the fact that you are using any of WAMP or LAMP as your underlying server, under the Windows 7/8 operating systems. (Please note that this is a sponsored post. If you need instruction on how to get this done in other operating systems, or want us to write a detailed tutorial on any other topic, please write to us at enquiries@eazeconcept.com)
To access your central computer from any other computer or mobile phone, you need to set up your central system to act as a router so that any other systems can connect to it. This is where we need to fire up the command prompt and set up a function called the windows netsh .
On windows 8, press the windows icon on your keyboard, usually beside “alt” and press ‘c’ alongside. A small tab pops up. Then press the key ‘a’. this will fire up the command prompt for admin. If you fire up the non-administrative command prompt, our command won’t work. So ensure you choose that of the admin. Click on ‘yes’ to give the necessary privilege. There you have, the command prompt is up, like this:
Now, type in the following code in the command prompt
netsh wlan set hostednetwork mode=allow ssid=myname key=yourpassword
Your ssid is the name that will appear in anyone’s WI-FI search. Key is your chosen password which must be more than 8 numbers or characters. After that, push enter on your keyboard. And you’ll be informed if successful or not. If not, read through the instruction given in the command prompt and retry. When you are done, You’ll receive a success information. Now, the router is set. The next thing is that you need to start it. To start it, type the following code in command prompt:
netsh wlan start hostednetwork
It will be started. Now turn on the wifi of the sytem you are trying to connect to your central PC. Search for the SSID you set up. You’ll see it. The password is the key you entered at the beginning of the setup. Great. You just connected to your PC from any device. Now the next questions is how do I access the page. On the central system, if you access your application through 127.0.0.1, for example, you can’t use the same ADDRESS ON THE CONNECTED DEVICE. This is because the IP address 127.0.0.1 is for the central system. To know the address the you need, type the following command in the command prompt:
Ipconfig
This will pop up a list of information. Note the IPv4 Address. That is your computer IP address. Type this IP address in the browser of your connected device. You should be directed to the application page.
Good luck!
If you need to stop the service, just type
netsh wlan stop hostednetwork
It will be stopped. Please note that you have to start this service anytime you want to use it.
Add new comment