Reputation: 1670
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;
Upvotes: 0
Views: 459
Reputation: 868
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
Upvotes: 1