Discussion:
[android-security-discuss] Submit Data to PHP Using POST Method
Shyjo Mathew
2015-12-04 13:33:12 UTC
Permalink
Hi,

I am not an expert to Andriod Application, mainly into PHP web development.
Last week I outsource my mobile applcation to a developer and he is
confused how to submit data to PHP web service, he decided to use JSON
format,

I would like to know how many ways we can submit the data from a mobile
application to a PHP web service. Can it be in both GET and POST methods,
so that we can access form elements from the $_POST and $_GET Method.

Finally I received an answer from the developer saying I have to access the
data variables using below method,

$postdata = file_get_contents("php://input");
$vars=json_decode($postdata);

Is this the only way to submit data from Andriod App to PHP we service, I
would like hear from an expert. Also need to know whether this is secure or
insecure.

thanks a lot, for your time.
Shyjo
--
You received this message because you are subscribed to the Google Groups "Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-security-discuss+***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/d/optout.
Kevin Chadwick
2015-12-04 15:22:26 UTC
Permalink
Post by Shyjo Mathew
or
insecure.
Always check your inputs and consider using suhosin!
--
KISSIS - Keep It Simple So It's Securable
--
You received this message because you are subscribed to the Google Groups "Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-security-discuss+***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/d/optout.
Avtar Singh
2015-12-04 14:44:32 UTC
Permalink
I don't think this is the right mailing list for this question. It is
perhaps better addressed to regular dev list. However, to answer your
questions:

I would like to know how many ways we can submit the data from a mobile
Post by Shyjo Mathew
application to a PHP web service. Can it be in both GET and POST methods,
so that we can access form elements from the $_POST and $_GET Method.
Yes. It depends on how you have deployed and implemented your web services,
but the short answer is yes.

Finally I received an answer from the developer saying I have to access the
Post by Shyjo Mathew
data variables using below method,
$postdata = file_get_contents("php://input");
$vars=json_decode($postdata);
Is this the only way to submit data from Andriod App to PHP we service, I
would like hear from an expert. Also need to know whether this is secure or
insecure.
I don't think it is the right way at all and neither secure. If your web
service end point and implementation is proper, you should not need to
retrieve your request data in that manner. And if it is not, I believe
there are better ways of submitting data to a web server. You can begin by
having your developer look at:
http://developer.android.com/training/volley/index.html

- Av
--
You received this message because you are subscribed to the Google Groups "Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-security-discuss+***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/d/optout.
Shyjo Mathew
2015-12-04 16:18:15 UTC
Permalink
Hi Avtar,

thanks for the response. Could you please lead me to any link which can
show me the methods which we can send data to a web service, server from an
Andriod application, available possible methods, so that I can select what
I need or change the web service according to that.

thanks again
Mathew
Post by Avtar Singh
I don't think this is the right mailing list for this question. It is
perhaps better addressed to regular dev list. However, to answer your
I would like to know how many ways we can submit the data from a mobile
Post by Shyjo Mathew
application to a PHP web service. Can it be in both GET and POST methods,
so that we can access form elements from the $_POST and $_GET Method.
Yes. It depends on how you have deployed and implemented your web
services, but the short answer is yes.
Finally I received an answer from the developer saying I have to access
Post by Shyjo Mathew
the data variables using below method,
$postdata = file_get_contents("php://input");
$vars=json_decode($postdata);
Is this the only way to submit data from Andriod App to PHP we service, I
would like hear from an expert. Also need to know whether this is secure or
insecure.
I don't think it is the right way at all and neither secure. If your web
service end point and implementation is proper, you should not need to
retrieve your request data in that manner. And if it is not, I believe
there are better ways of submitting data to a web server. You can begin by
http://developer.android.com/training/volley/index.html
- Av
--
You received this message because you are subscribed to the Google Groups "Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-security-discuss+***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/d/optout.
Loading...