2

从 vb.net 调用 php 文件的最佳方法是什么?理想情况下,我需要一些可以放在函数中并使用几个参数调用以传递到 url 字符串的东西。谢谢

4

1 回答 1

1

您可以使用System.Net.HttpWebRequest

    Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(New System.Uri("http://contoso.com/query.php?param1=val1&param2=val2"))

    request.Method = System.Net.WebRequestMethods.Http.Get

    Dim response As System.Net.HttpWebResponse = request.GetResponse()

    ' process response here

    response.Close()
于 2012-07-20T02:16:38.100 回答