0
"string(2866) "[{"id":275647,"account_id":35956,"name":"www.xxx.com/","title":"www.xxx.com/","active":true,"engine":{"name":"Google","engine_id":37,"region_id":0},"created_at":"2021-10-04T12:42:10.160Z"},

{"id":266409,"account_id":35956,"name":"xxx.com","title":"xxx.com","active":true,"engine":{"name":"Google","engine_id":37,"region_id":0},"created_at":"2020-10-07T17:43:13.407Z"}]

I have a json api but I'm not print.

I want to print like below.

Your account id = account_id site name = title

How I do this ?

 $url = "https://seo.unamo.com/api/v1/campaigns.json";

            $curl = curl_init($url);
            curl_setopt($curl, CURLOPT_URL, $url);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

            $headers = array(
            "Token: xxxxxxxxxxxxxxxxxxxxxxx",
            );
            curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
            //for debug only!
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

I use These are to get the data code.

0 Answers0