Friday, 15 April 2011

dns - HTTP POST request from Android App denied on Domain but works using IP address‏ -


I am trying to send an HTTP post request from my Android app to a PHP file on my web hosting server.

That request contains the data of the app and it is valid or saved on the server, and then the PHP file sends a JSON response that is received by the Android device and verbs are logged or registered Etc. is taken according to

The problem that has arisen is that I had not yet been paid DOMAIN instead of just a HOSTING service.

That's why I added the URL in my Android code like this and the request and response were working perfectly. .

I have now bought a domain name from Godaddy.com and I am forwarding that domain name to the server IP and when I open it in the browser, it is working perfectly well.

  if ($ ($ _ POST ['' '' tag ']) & $ _POST [' tag '] =' ') {// tag $ tag = $ _POST [ 'Tag']; // do other authorizations do the same} and repeat "login denied";  

The problem now is that when I'm using the server IP address to connect, this block and function goes right. But when I use a domain name it always rejects the entry.

Show logs:

  03-18 02: 59: 08.780: E / JSON (30 9 2): Deniedn entry 03-18 02:59 : 08.780: E / JSON Parser (30892): Error parsing data org.json.JSONException: Enter the value java.lang.String JSONObject 03-18 02 can not be changed: 59: 08.780: W / Systems Er (30892): java.lang.NullPointerException: Attempting to open the virtual method 'java.lang.String org.json.JSONObject.getString (java.lang.String)' on a null object reference  < / Pre> 

Now I do not know why a letter 'N' has been added after why 'not allowed to enter' nor why the request has not been brought correctly.

PS I used forwarding instead of updating NS to domain. What could possibly be the reason for this issue?

With your DNS configured to forward, your post-request lost. Check your server logs You have to set it to record Type A .


No comments:

Post a Comment