cURL Upload file AND send POST data
Posted
by
kisplit
on Super User
See other posts from Super User
or by kisplit
Published on 2011-01-14T16:37:23Z
Indexed on
2011/01/14
16:55 UTC
Read the original article
Hit count: 215
Hello, I have a web server running some PHP that checks for an image (curl -F 'imageName=@myimage') and it also checks the POST data for username=&password=.
When the PHP checks _REQUEST I can just do:
curl -F 'imageName=@myimage' 'http://www.example.com/?upload=1&username=test&password=test'
I need to instead check _POST for username and password due to specs. How can I upload the image and have the username=&password= post data?
Any help appreciated!
© Super User or respective owner