I am trying to send simple data to some site, in this example, to a php file on my local server. My VB.NET Code:
Dim W As New Net.WebClient
Dim A As String = ""
W.Encoding = System.Text.Encoding.UTF8
Dim URL As String = "http://localhost/test/p.php"
A = W.UploadString(URL, "bla=test")
MsgBox(A)
and here p.php:
<?
print_r($_POST);
echo "\n";
print_r($_GET);
?>
so when I run the VB.NET application, it just calls p.php (GET), but POST does not work. I tried everything. Configured p.php to other servers, checked other variables in php ($ _REQUEST), used UploadString (URL, "POST", "bla = test"), used PERL, ASP .. nothing.
I am using the .NET Framework 3.5 Any ideas on how to send data using vb.net?
source
share