Joseph James Shenton Joseph James Shenton - 19 days ago 7x
PHP Question

cURL Commands in PHP

Hi there so i am trying to use the Freenom API for a service called iForce to register domain names for people really easily and i came accross this cURL command but i have no idea how to make PHP run it.

The following is the command

curl -X GET "\

If someone could please convert that to php or tell me how to or tell me how to use it in php that would be amazing!

Thank you so so much!


Something like:


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"");
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Try it on true first, if that fails, set it back to false.

$server_output = curl_exec($ch);

curl_close ($ch);


Now you can use $server_output for your needs.