Skip to content

Instantly share code, notes, and snippets.

View verschoren's full-sized avatar

Thomas Verschoren verschoren

View GitHub Profile
<?php
function zd($url, $json, $action, $ZDAPIKEY,$ZDUSER,$ZDDOMAIN,$decode) {
$ZDURL = "https://".$ZDDOMAIN.".zendesk.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10 );
curl_setopt($ch, CURLOPT_URL, $ZDURL.$url);
curl_setopt($ch, CURLOPT_USERPWD, $ZDUSER."/token:".$ZDAPIKEY);
switch($action){
case "POST":

Keybase proof

I hereby claim:

To claim this, I am signing this object: