从vb.net调用php文件的最佳方法是什么?理想情况下,我需要一些可以放在函数中的东西,并调用几个参数传递给url字符串。感谢
答案 0 :(得分:1)
您可以使用System.Net.HttpWebRequest:
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(New System.Uri("http://contoso.com/query.php?param1=val1¶m2=val2"))
request.Method = System.Net.WebRequestMethods.Http.Get
Dim response As System.Net.HttpWebResponse = request.GetResponse()
' process response here
response.Close()