How do I connect to the PredictIt API (type application/xml) using PHP/CURL? -
this code not returning anything:
<?php $ch = curl_init(); $header = array('contect-type: application/xml', 'accept: application/xml'); $options = array( curlopt_url => 'https://www.predictit.org/api/marketdata/ticker/rnom16', curlopt_httpheader => $header, curlopt_httpauth => curlauth_basic, curlopt_returntransfer => true ); curl_setopt_array($ch, $options); $data = curl_exec($ch); curl_close($ch); echo '<p>data</p>'; print_r($data); ?>
does know what's wrong?
thank you.
Comments
Post a Comment