this is the code i've managed to write till now... no output though... 😞 can anyone guide me please!
$signature = "xxxxx";
$user_id = "xxxx";
$encryption_key = "";
if (isset($user_id) && isset($encryption_key)) { // execute only if both are set
$request_time = date(DATE_W3C, time());
$access_key = trim($user_id);
$secret_key = trim($encryption_key);
$encrypt_input = $request_time . $access_key;
$signature = hash_hmac('sha1', $encrypt_input, $secret_key);
} else {
$user_id = '';
$encryption_key = '';
}
//$client = new SoapClient(null);
$attrs = array(
'mktowsUserId' => $access_key,
'requestSignature' => $signature,
'requestTimestamp' => $request_time,
);
$client = new SoapClient("http://090-BZJ-603.mktoapi.com/soap/mktows/1_2?WSDL");
$header = new SoapHeader('http://www.marketo.com/mktows/', 'AuthenticationHeader', $attrs);
$client->__setSoapHeaders($header);
$xml = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt="http://www.marketo.com/mktows/">
<soapenv:Header>
<mkt:AuthenticationHeader>
<mktowsUserId>'.$access_key.'</mktowsUserId>
<requestSignature>'.$signature.'</requestSignature>
<requestTimestamp>'.$request_time.'</requestTimestamp>
</mkt:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<mkt:paramsGetMultipleLeads>
</mkt:paramsGetMultipleLeads>
</soapenv:Body>
</soapenv:Envelope>';
print_r($client->__call("getMultipleLeads",$xml));