I want to get JSON response from my localhost where I have created a .php file which is returning the JSON response.. It works well except for localhost. My apache server and myPhp server are working well. Could somebody assist me?
-
1Give some more information on your problem. Elaborate a little bit.Nagri– Nagri2012-11-08 06:43:07 +00:00Commented Nov 8, 2012 at 6:43
-
Ok. I have created a class in android which is accepting an URL and converting the JSON response returned by the URL to string.. Finally the class displays the string ( i.e JSON response). It works well for all URL's. But if I want to do the same for the URL i.e. .php file stored on localhost it gives me an error org.apache.http.conn.HttpHostConnectException: Connection to localhost refused.. I am confused for this. If you want I can put my code hereVishal– Vishal2012-11-08 06:50:29 +00:00Commented Nov 8, 2012 at 6:50
-
1Which port you are trying to connect to ?Nagri– Nagri2012-11-08 06:53:19 +00:00Commented Nov 8, 2012 at 6:53
-
1which OS are you using for development linux or windows ?Nagri– Nagri2012-11-08 06:56:48 +00:00Commented Nov 8, 2012 at 6:56
-
1Ok the first thing I would suggest you is to check if the port is free and not used by any other process and i don't know how to do that on mac. The second is you try to change the localhost IP and Port on from which your program is interacting.Nagri– Nagri2012-11-08 07:01:48 +00:00Commented Nov 8, 2012 at 7:01
|
Show 3 more comments