I want to use this curl command (works with Windows curl)
curl -k -i -H "Accept: application/json" https://brackets-registry.aboutweb.com/registryList
inside php curl. I tried this code:
<?php
$url="https://brackets-registry.aboutweb.com/registryList";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-type: application/json']);
$result = curl_exec($ch);
curl_close($ch);
var_dump($result);
But I don't get any json only html source code.
I think I am using the -H
and the -k
option, right? Don't know how to add -i
.