I want to convert command line cURL to PHP cURL in order to have better control.
Note it is included authentication with MYUSER and MYTOKEN.
Linux server is running Apache 2 and PHP 7.2.
curl -u 'MYUSER:MYTOKEN' 'https://example.com' -X POST --data '{"domainNames":["example.org","site2.com"]}'
What PHP code would you use to obtain the same functionality?