简体   繁体   English

从PHP获取数据

[英]GET Data from PHP

I have a PHP login script. 我有一个PHP登录脚本。 I should check login credentials which user entered on C# Metro application. 我应该检查哪个用户在C#Metro应用程序上输入的登录凭据。 My php script returns json data when succesful. 成功时,我的PHP脚本返回json数据。 So how can I make a connection between c#-php? 那么如何在c#-php之间建立连接?

I know something about HttpWebRequest. 我对HttpWebRequest有所了解。 I think I should use GET method to check login credentials. 我认为我应该使用GET方法来检查登录凭据。 I tried download data from this link : 我尝试从此链接下载数据:

www.example.com/myscript.php?username=xxxx&password=12345

But it says error. 但是它说错误。 And I can't any data when I tried it on browser. 在浏览器上尝试时,我无法获得任何数据。

Can you share your script and the errors you are getting? 您可以分享您的脚本和您遇到的错误吗? If you access the url with the browser and get an error, the metro app will of course also get an error. 如果您使用浏览器访问URL并收到错误消息,则Metro应用程序当然也会收到错误消息。

Also, please make sure you are using https. 另外,请确保您使用的是https。

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

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