I’m using Curl library to simulate “multipart-form-data” submission, then I noticed that I need to generate a unique string, but I have no idea how to do that.
For example:
Content-Type: multipart/form-data;
boundary=---------------------------491299511942
Content-Length: 95418
-----------------------------491299511942
Content-Disposition: form-data; name="a"
-----------------------------491299511942
Content-Disposition: form-data; name="b"
/page.asp
-----------------------------491299511942
Content-Disposition: form-data; name="c"
-----------------------------491299511942
Content-Disposition: form-data; name="d"
true
-----------------------------491299511942
Content-Disposition: form-data; name="e"
1
-----------------------------491299511942
Content-Disposition: form-data; name="f"
How to generate that boundary? From library or just some hack?
EDIT: in this example Boundary=491299511942
if you using curl you don’t need prepare data “manually”