How to convert curl command to PHP curl representation

curl -p --insecure "ftp://127.0.0.1:21111" --user "test:test" -Q "-RNFR /home/text.txt" -Q "-RNTO /data/text.txt"

how to write this curl command using the curl method of PHP

Php
Jul.18,2022

$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, TRUE);
curl_setopt ($ch, CURLOPT_NOBODY, TRUE); / / remove body
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
$head = curl_exec ($ch);
$httpCode = curl_getinfo ($ch, CURLINFO_HTTP_CODE);
curl_close ($curl_close);

< ch "ch" >

is not solved, it is implemented with ch

Menu