Here is command line CURL code:-
curl -X POST "http://{$HOST}/api/1/videos.json" \
-H "Content-type: application/json" \
-H "X-Reseller-Email: $RESELLER" \
-H "X-Reseller-Token: $TOKEN" \
-H "X-User-Email: $USER" \
-d '{"video":{
"title": "My video from API",
"description": "Description from API",
"video_template_id": "16",
"track_id": "26",
"texts": [
{
"layer": "VLN_txt_01",
"value": "My text 1"
}
],
"images": [
{
"layer": "VLN_icon_01",
"source": "icon",
"icon_id": "1593"
}
]
}}'
Please help me to convert this into PHP CURL call. Also, i need this call with POST and PUT methods. I have founded that but does not able to convert the data payload in PHP.
I just need to know that how can i write the " -d " (data) in PHP which affect same as command line CURL call in PHP.