<?php
$url = '';
$username = '';
$token = '';
$fieldid = ;
// Radiobutton
$xml_data = '
<xmlrequest>
<username>' . $username . '</username>
<usertoken>' . $token . '</usertoken>
<requesttype>customfields</requesttype>
<requestmethod>Save</requestmethod>
<details>
<fieldid>'.(int)$fieldid.'</fieldid>
<fieldtype>checkbox</fieldtype>
<Options>
<Key></Key>
<Value></Value>
</Options>
<Settings>
<FieldName>API checkbox veldje</FieldName>
<FieldRequired>on</FieldRequired>
<Key>groen,blauw,oranje</Key>
<Value>groen,blauw,oranje</Value>
</Settings>
</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.