Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

is it possible for me to connect to http://localhost websites on my laptop from my phone without any internet connection?

Phone is Samsung Galaxy W. Laptop Acer with Windows 7. The server I'm using on the laptop is XAMPP at the moment, but this can be changed if another program is easier.

Basically, I want to connect to my laptop server from the phone without router or internet connection.

I know the phone is supposed to have hotspot functionality, does this work without internet (just bought it so I don't know much about it yet)?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

One solution to your problem probably is Reverse Tether:

Reverse Tether Reverse Tether

Other than your hotspot functionality (which lets you use your phones Internet connection with other devices via Wifi), this allows you to use your computers network via USB, as the screenshots imply. Thus your phone gets a (configurable) IP address (pic1: "Desired IP") matching your computers (pic1: "Gateway IP"; it is important that both are part of the same subnet), and then you can access your computers web services from your Android device as described before (using the computer's IP).

Drawback: This solution requires your device to be rooted. I will check further, maybe I find a similar solution not requiring root, and then will update my answer with that new information.

UPDATE:

If your computer is equipped with Wifi, an "adhoc connection" could also provide a solution. You might want to take a look at the question How to connect android wifi to adhoc wifi? for details on this. And there is a brand new article just published today at PC Advisor: Connect Android phone to Ad Hoc network, which might be even more helpful to you.

share|improve this answer
    
That adhoc network thing looks just like what I was looking for. Will look into it thanks alot. –  hustlerinc Jul 30 '12 at 21:44
    
Glad I was able to help! Would be nice if you also could add your results on adhoc here, once your reached them ;) –  Izzy Jul 30 '12 at 21:51

Assuming the phone and your laptop are on the same network AND the web server is listening on the right ports, you should be able to just use the local IP of your laptop.

http://192.168.1.100/ (or whatever the IP address happens to be)

share|improve this answer
    
Okay, I don't need a router for them to be on the same network right? –  hustlerinc Jul 30 '12 at 18:08
2  
Well, I expect you would. My answer assumes that you're using the phone on your home wifi network. If not, you'll need to punch holes in your firewall to access your laptop from the Internet. –  Al E. Jul 30 '12 at 18:10
    
If the OP requires access to http://localhost/ (as the special service is bound to localhost -- i.e. 127.0.0.1), another IP address won't help. @hustlerinc, maybe you give some more details on what you want to achieve: What kind of localhost service etc., and if you can only reach it on http://localhost or also on your computers other IP address (execute ipconfig on a command prompt to find out your IP addresses). –  Izzy Jul 30 '12 at 18:46
    
@Izzy It looks like the OP is running a webserver on their laptop, which they wish to access from another machine (a phone) on their LAN. In this case, accessing http://laptop-ip/ should be sufficient; if firewalls permit. Although, it might be questionable whether they actually have a LAN set up? –  w3d Jul 30 '12 at 19:31
    
Yeah, w3d assumed right, only that I'm not using router or LAN. I would like to setup this connection on the run, wherever I am (to be able to test my browser games on the phone without downloading). And I added some info in the post. –  hustlerinc Jul 30 '12 at 19:35

Can be done through a bluetooth PAN network using the internet sharing feature on smartphone. As soon as both belong in same PAN network, smartphone can navigate host's web server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.