Search the Community
Showing results for tags 'php curl api'.
Hi Everyone, I'm not new to development, but I'm new to PHP and cURL. I'm just working on a project for a friend, attempting to tie his website to his CRM. I'm getting a 415 from a basic api request and I'm guessing someone can probably take one look at this code and tell me what I'm missing. Any help would be appreciated. Thanks Robert $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPHEADER, "Content-Type: application/json; charset=utf-8"); curl_setopt($curl, CURLOPT_HEADER, 1); curl_setopt($curl, CURLOPT_USERPWD, $username . ":" . $password); curl_setopt($curl, CU