Trying to develop a webForm with html-php-curl

I’ve already checked the post but I’m a bit confused, I’m new to this type of scripting and the code posted on your reference seems to a comand line upload through curl, so can you guide me a bit to how to port that code to php? because my objective is make a html form to be published on web.

Thanks for your answer.
Regards