<?php
$url = '';
$username = '';
$token = '';
$xml_data = '
<xmlrequest>
<username>' . $username . '</username>
<usertoken>' . $token . '</usertoken>
<requesttype>tags</requesttype>
<requestmethod>GetTags</requestmethod>
<details>
<tags>11</tags>
<ownerid>7</ownerid>
<tagtype>s</tagtype>
<sortinfo>
<SortBy>name</SortBy>
<Direction>asc</Direction>
</sortinfo>
<countonly>false</countonly>
<globalonly>false</globalonly>
<groupid>0</groupid>
<start>0</start>
<perpage>20</perpage>
</details>
</xmlrequest>
';
$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.