This seems to be working flawlessly except lately i've noticed that it's missed out a few members and not added them to my mailing list.
Any ideas why this would happen? Here's my plugin code;
Code:
$username = $userinfo['username'];
$email= $userinfo['email'];
$userid= $userinfo['userid'];
$xml = "<xmlrequest>
<username>admin</username>
<usertoken>XX8410b36f01de9fe7df722ab2864677afddfaXX</usertoken>
<requesttype>subscribers</requesttype>
<requestmethod>AddSubscriberToList</requestmethod>
<details>
<emailaddress>$email</emailaddress>
<mailinglist>1</mailinglist>
<format>html</format>
<confirmed>yes</confirmed>
<customfields>
<item>
<fieldid>12</fieldid>
<value>$username</value>
</item>
<item>
<fieldid>13</fieldid>
<value>$userid</value>
</item>
</customfields>
</details>
</xmlrequest>
";
$ch = curl_init('http://www.maximum-jackson.com/interspire/xml.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
$result = @curl_exec($ch);
if($result === false) {
echo "Error performing request";
}
else {
$xml_doc = simplexml_load_string($result);
//echo 'Status is ', $xml_doc->status, '<br/>';
if ($xml_doc->status == 'SUCCESS') {
//echo 'Data is ', $xml_doc->data, '<br/>';
} else {
//echo 'Error is ', $xml_doc->errormessage, '<br/>';
}
}
Any help would be greatly appreciated!