Hi Bob, I have some updates, forget everything I said except the part about the manuals I get from COntactLab.
I analyzed better the code they sent me, and perhaps a solution is just include the code about the "addSubscriber" procedure, I paste the code here for better explanations:
<?php
// This example needs to be filled with proper values.
// Please read the documentation for further information.
require_once(dirname(__FILE__)."/../client/ClabService.php");
$clabService = new ClabService();
try {
$clabService = new ClabService();
$btoken = new borrowToken();
$btoken->apiKey = INSERT YOUR API KEY HERE;
$btoken->userKey = INSERT YOUR USER KEY HERE;
$token = $clabService->borrowToken($btoken)->return;
/*
* prepare data structure
*/
$attribute = new SubscriberAttribute();
$attribute->key = <<a key name>>;
$attribute->value = new SoapVar(<<a value>>,XSD_ANYTYPE,'string','http://www.w3.org/2001/XMLSchema','value');
$attributes[] = $attribute;
$attribute = new SubscriberAttribute();
$attribute->key = <<a key name>>;
$attribute->value = new SoapVar(<<a value>>,XSD_ANYTYPE,'string','http://www.w3.org/2001/XMLSchema','value');
$attributes[] = $attribute;
$subscriber = new Subscriber();
$subscriber->identifier = null;
$subscriber->attributes = $attributes;
$addSub = new addSubscriber();
$addSub->token = $token;
$addSub->subscriber = $subscriber;
$addSub->sourceIdentifier = << a source identifier>>;
$ret = $clabService->addSubscriber($addSub);
echo "Subscriber ".$ret->return->attributes[0]->value." successfully added with ID: ".$ret->return->identifier;
//var_dump($ret);
} catch (SOAPFault $f) {
var_dump($f);
}
?>
As you can see there are some fields to be filled like API KEY e USER KEY, I have those keys.
At the very start of this code you can see also this
"require_once(dirname(__FILE__)."/../client/ClabService.php");"
I have those folder with a bunch of PHP files, in which i found also CalbService.php.
Now, my question is, I uploaded that folder with those files on my server, in the root of the site, I want to access it and I must change this path, obviously, "require_once(dirname(__FILE__)."/../client/ClabService.php");"
In your opinion a form created with Chronoforms, where is located form the root of my site?
Than the second answer is, how can I use that code in my forms at the event OnSubmit? I tried the element "CustomCode" but strangely it doesn't do anything, if I write simply a php that echoes something it does the job, print something, instead if I wirte that code , nothing happens, also a simply echo doesn't do anything.
Thanks again