0

I am using the code below to upload a file to a remote php page. I would like to post an additional variable to verify the identity of the system uploading the file. Is there any way to add a header to the WebClient UploadFile that would allow the receiving script to have access to a posted variable?

WebClient webClient = new WebClient();
webClient.UploadFileAsync(new Uri(HTTP_VERSIONCTRL_URL), fileloc);
webClient.UploadProgressChanged += OnProgress;

1 Answer 1

1

you can add a header like this

webClient.Headers.Add("OurSecurityHeader", "encryptedvalue");

On the php side, you can use this to read headers:

How do I read any request header in PHP

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.