【发布时间】:2021-04-20 09:56:20
【问题描述】:
我必须通过 php 脚本执行以下操作
curl --location --request POST 'https://api.mydomain.in/api/comm/wa/send/text' \
--header 'Content-Type: application/json' \
--header 'token: xyz123456' \
--data-raw '{
"phone": "8822992929",
"ID": 26,
"text": "Dear Customer. Thank you for your purchase. "
}'
如何通过 php curl exec 执行此操作。我看不出如何在这个中传递数据
【问题讨论】:
-
您能分享一下您尝试过的方法以及遇到的具体问题吗?
-
我建议从阅读the docs开始。
-
我想如果问得更清楚,这可能是stackoverflow.com/questions/871431/raw-post-using-curl-in-php的副本