简体   繁体   English

Android-App登录网站

[英]Android-App log in to website

I have a question about how i can log in to my Website with my Android app. 我有一个关于如何使用Android应用程序登录我的网站的问题。 I want to write an app referring to my website, so that I can log in and browse the new stuff in my app. 我想编写一个引用我的网站的应用程序,以便我可以登录并浏览应用程序中的新内容。

The website is written in PHP. 该网站是用PHP编写的。 Now I wonder how I can log in with username and password from my app. 现在,我想知道如何使用我的应用程序中的用户名和密码登录。 And also can I call GET or POST Methods etc. ? 我也可以调用GET或POST方法等吗?

Can you recommend any tutorial? 你能推荐任何教程吗?

Thank you very much. 非常感谢你。

Ofcourse yes you can use. 当然可以。

As you mentioned, website is written in PHP. 如前所述,网站是用PHP编写的。 make that response to encode in json. 使该响应编码为json。 do some stuff in php side like collection of response in json. 在php端做一些事情,例如json中的响应集合。 echo json_encode($response); 回声json_encode($ response); in php for the login page and it displays json response. 在php中的登录页面,它显示json响应。

Refer this tutorial. 请参考本教程。 Login with username and password 使用用户名和密码登录

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM