문제

I want to pass parameters with cURL and get it using argv

Just like -

curl 'http://xx.xx.xx.xx/test.php {MY JSON DATA}'

and I want this json data as an argument - like it should print an array of arguments like

Array
(
    [0] => test.php
    [1] => 2345232wqwfdwfsdf
)

Note - I can use POST/PUT method for getting the data but I want to know can I use argv when using curl command?

도움이 되었습니까?

해결책

As for the posting of the data, see How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?

As for reading it inside of php, it will be in $_POST

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top