To upload a file via curl:
curl http://api.example.com/profile -F "image=@profile.jpg"
In php this will give you the profile.jpg in the $_FILES['image'], now to add additional field values you just add additional -F arguments like this:
curl http://api.example.com/profile -F "image=@profile.jpg" -F "phone=123456789"
To post simple field/value:
curl http://api.example.com/profile -d "phone=123456789&name=Hwei"