accesing to localhost from the emulator??

Put your problem here if it does not fit any of the other categories.

accesing to localhost from the emulator??

Postby xayide » Sat Mar 29, 2008 12:57 pm

Hello!

I have a php page running on apache server in my computer. To acces from the emulator to my computer you cannot put http://localhost, as localhost is from the emulator itself, that´s why i´m using 10.0.2.2 . I´m trying to send data from the emulator to the php page to do some work. The problem is that it doesn´t do any work! I don´t know if the problem is from the emulator or from my page... the
code in the emulator is this:

String get="?name=myname&surname=mysurname&address=myaddress";
URL url = new URL("http://10.0.2.2/myfolder/index.php"+get);
URLConnection urlconn = url.openConnection();

In the php page i read the data send by get and do some work. But it doesn´t do anything... i don´t know if the connection is well made or the problem is from the server...

any ideas??

thanks!!
xayide
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 05, 2008 1:23 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 14 guests