how to write put mapping api using php code. currently iam using curl command
curl -X PUT "localhost:9200/new-index/_mapping" -H 'Content-Type: application/json' -d' {"properties": { "new-email": {"type": "keyword"}}}'
please help me to convert this curl command to php code