function zopim_post_request in Zopim Live Chat 6.2
2 calls to zopim_post_request()
File
- ./
zopim.module, line 268
Code
function zopim_post_request($url, $data, $ssl = NULL) {
$ssl = $ssl ? $ssl : variable_get('zopim_use_ssl', '1');
$headers = array(
'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8',
);
$url = $ssl === 1 ? $url : str_replace("https", "http", $url);
$data = drupal_query_string_encode($data);
$request = drupal_http_request($url, $headers, 'POST', $data);
return drupal_parse_json($request->data);
}