I have various PHP files which data is Posted to (like the password when the user signs in) How can I post to these PHP from vb.net (a desktop application that is Windows Forms, this is not about ASP.net)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
WebClientclass. You need to set theContent-Typeheader toapplication/x-www-form-urlencodedand then use theUploadDatamethod. The documentation of that method contains a simple example, which basically boils down to this:The Wikipedia page of HTTP POST contains information of how the POST data must be encoded:
So, your
postDatavariable can be filled like this (assuming that the fields you want to post are called Username and Password):