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;
jimmyjambles
  • 1,631
  • 2
  • 20
  • 34

1 Answers1

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

Community
  • 1
  • 1
dumdum
  • 838
  • 5
  • 10