I created a database in my PC, and now I want to retrieve all table data and display them on my phone usin Google gson library by executing a php file in the server. The problem is the phone can’t connect to the PC to execute that php file:
Error 403 for URL http://192.168.1.2/android_connect/get_all_products.php
I’m sure that the code is working cause i tested with that online link and data are retrieved in the phone.
The url is like that in JAVA code:
String url = "http://192.168.1.2/android_connect/get_all_products.php";
Is that correct? Is there something to do to let the phone connect to the PC?
Thank you for helping.
To allow remote access to apache on Windows change the file:
c:\wamp\bin\apache\Apache2.2.22\conf\httpd.confYou need to allow remote access to directory C:\wamp\www like this:(add that lines)
And RESTART YOUR SERVER.