Hee-Joong Kim | Hello, Couple of months ago, I involoved in DMM related project. I'm looking for PHP code for Digital Signage API. I tried this code, but did'n work. I got blank pages.. ------------------ my code ------------------- <? $username = 'superuser'; $password = 'Mypassword';
$service_url = "https://ciscodmm.mydomain.com:8443/xTAS-core/services/dmpgroup/hierarchy/all/"; $userAuth = base64_encode("$userName:$password"); // set curl header options $curl_header = "GET ¿.$service_url.¿ HTTP/1.0 \r\n"; $curl_header .= "MIME-Version: 1.0 \r\n"; $curl_header .= "Content-type: application/xml \r\n"; $curl_header .= "Authorization: Basic \r\n"; $curl = curl_init();// create curl handler // set curl options curl_setopt($curl, CURLOPT_URL, $service_url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $curl_header); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); $response = curl_exec($curl);// execute the curl request if(curl_errno($curl)){// check for error in processing curl request exit; } curl_close($curl);// close the curl connection //echo $response; print $response; $str = $response; echo base64_decode($str);
?> ------------- end of code ------------------------------------- Thanks... |