Hey guys, i've been working with citric guy and he did get this working with the following code;
(i've HIDDEN personal bits)
Code:
$username = $userinfo['username'];
$email= $userinfo['email'];
$userid= $userinfo['userid'];
$xml = "<xmlrequest>
<username>HIDDEN</username>
<usertoken>HIDDEN</usertoken>
<requesttype>subscribers</requesttype>
<requestmethod>AddSubscriberToList</requestmethod>
<details>
<emailaddress>$email</emailaddress>
<mailinglist>4</mailinglist>
<format>html</format>
<confirmed>yes</confirmed>
<customfields>
<item>
<fieldid>1</fieldid>
<value>$username</value>
</item>
<item>
<fieldid>2</fieldid>
<value>$userid</value>
</item>
</customfields>
</details>
</xmlrequest>
";
$ch = curl_init('http://www.HIDDEN.com/inspire/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/>';
}
}
Citric has this mod working seamlessly with his forum, we've been working together and i've came across a problem where, when I register a test account - it works instantly, but any further accounts created on my end, aren't added to the inspire/sendstudio database.
Citric has tried this on his end and it's exactly the same.
The only thing different on my end is that I have manual admin approval for all registrations, aswell as email authentication and he only has email authentication.
The hook location currently used, which works for him fine is
register_activate_process
Can anyone see why this would happen? Why it would work once from one computer, then not continue?
Thank you very much!
Greg