# api: getLead by ipaddress?

**URL:** <https://forum.mautic.org/t/api-getlead-by-ipaddress/3293>\
**Category:** Development\
**Created:** [January 23, 2016, 9:37am UTC](https://forum.mautic.org/t/api-getlead-by-ipaddress/3293 "2016-01-23T09:37:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bas\_Hekking](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@Bas\_Hekking](https://forum.mautic.org/u/Bas_Hekking)\
**Post date:** [January 23, 2016, 9:37am UTC](https://forum.mautic.org/t/api-getlead-by-ipaddress/3293/1 "2016-01-23T09:37:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bas\_Hekking](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@Bas\_Hekking](https://forum.mautic.org/u/Bas_Hekking)\
**Post date:** [January 23, 2016, 9:37am UTC](https://forum.mautic.org/t/api-getlead-by-ipaddress/3293/2 "2016-01-23T09:37:25Z")

</div>

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
