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

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -