<?php
$url = '';
$username = '';
$token = '';
$xml_data = '
<xmlrequest>
<username>' . $username . '</username>
<usertoken>' . $token . '</usertoken>
<requesttype>lists</requesttype>
<requestmethod>GetLists</requestmethod>
<responsetype>json</responsetype>
<details>
<start>0</start>
<perpage>all</perpage>
</details>
</xmlrequest>
';
/*
$xml_data = '
<xmlrequest>
<username></username>
<usertoken>b797b6d8c3ef95d525f87b37989b193cfdae1d71</usertoken>
<requesttype>lists</requesttype>
<requestmethod>GetLists</requestmethod>
<details>
<lists></lists>
<countonly>false</countonly>
<confirmedonly>false</confirmedonly><sortinfo>
<SortBy>createdate</SortBy>
<Direction>asc</Direction></sortinfo>
<start>0</start>
<perpage>all</perpage>
<status>1</status>
</details>
</xmlrequest>';
*/
//$url = ' ';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_POST, true);
if (!ini_get('safe_mode') && ini_get('open_basedir') == '') {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
}
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'xml=' . $xml_data);
$pageData = curl_exec($ch);
if (!$pageData) {
echo "Error!: " . curl_error($ch);
echo "\n";
exit;
}
curl_close($ch);
echo $pageData . "\n";
?>
Opmerkingen
0 opmerkingen
U moet u aanmelden om een opmerking te plaatsen.