对Zoho API CRM没有任何回应

I am trying to use getSearchRecordsByPDC method which can be found here https://www.zoho.com/crm/help/api/getsearchrecordsbypdc.html#Request_URL

I have this code:

private $token = '1234567890abcdefg';
public $responseType = 'xml';

 public function getSearchRecordsByPDC($searchValue,$searchColumn='email')
 {
 $url = "https://crm.zoho.com/crm/private/".$this->responseType."/Leads/getSearchRecordsByPDC?newFormat=1&authtoken=".$this->token."&scope=crmapi&selectColumns=Leads(First Name,Lead Source,Phone,Mobile,Website,Lead Status,Description,Last Name,Website,Email,Lead Owner)&searchColumn=$searchColumn&searchValue=$searchValue";

 $result = $this->curlRequest($url);
 return $result;
 }

 public function curlRequest($url)
 {
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, $url);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 $output = curl_exec($ch);
 curl_close($ch);
 return $output;
 }

$data = $zoho->getSearchRecordsByPDC('my_email@gmail.com');
print_r($data);

I just posted some snippets of my code to not appear it to be very long.

When running this code. I am not getting any response, even an error message or whatsoever, like I am getting a blank response, no xml response or whatever. But when ever I try to copy and paste the $url variable output into my web browser, I am getting response, and those response are valid.

What's wrong with this? Your help will be greatly appreciated! Thanks!

It looks like you are mixing up OOP and procedural code. Try this:

class Zoho {
    private $token = '1234567890abcdefg';
    public $responseType = 'xml';

    public function getSearchRecordsByPDC($searchValue,$searchColumn='email')
    {
        $url = "https://crm.zoho.com/crm/private/".$this->responseType."/Leads/getSearchRecordsByPDC?newFormat=1&authtoken=".$this->token."&scope=crmapi&selectColumns=Leads(First Name,Lead Source,Phone,Mobile,Website,Lead Status,Description,Last Name,Website,Email,Lead Owner)&searchColumn=$searchColumn&searchValue=$searchValue";

        $result = $this->curlRequest($url);
        return $result;
    }

    public function curlRequest($url)
    {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        $output = curl_exec($ch);
        curl_close($ch);
        return $output;
    }
}

$zoho = new Zoho;
$data = $zoho->getSearchRecordsByPDC('my_email@gmail.com');
print_r($data);