Mautic Community Forums

api: getLead by ipaddress?

Hi,



I’m using the api, and I would like to to determine the lead that is visiting a php page. Is it possible to filter on ip address? I noticed the ipAddresess field, but I can not filter on it with, probably because it is an array



$filter = ‘ipAddresses:’.$_SERVER;

$leads = $leadApi->getList($filter);



Is there a way to do this?



Or are there other/better ways to determine a lead on a php page?



regards,



Bas

Hi,

I’m using the api, and I would like to to determine the lead that is visiting a php page. Is it possible to filter on ip address? I noticed the ipAddresess field, but I can not filter on it with, probably because it is an array

$filter = ‘ipAddresses:’.$_SERVER[‘REMOTE_ADDR’];
$leads = $leadApi->getList($filter);

Is there a way to do this?

Or are there other/better ways to determine a lead on a php page?

regards,

Bas