You are here

public static function Helper::ip__resolve in Anti Spam by CleanTalk 9.1.x

Same name and namespace in other branches
  1. 8.4 src/lib/Cleantalk/Common/Helper.php \Cleantalk\Common\Helper::ip__resolve()

* Get URL form IP * *

Parameters

$ip: * * @return string

1 call to Helper::ip__resolve()
Helper::ip__resolve__cleantalks in src/lib/Cleantalk/Common/Helper.php
* Get URL form IP. Check if it's belong to cleantalk. * *

File

src/lib/Cleantalk/Common/Helper.php, line 482

Class

Helper
CleanTalk Helper class. Compatible with any CMS.

Namespace

Cleantalk\Common

Code

public static function ip__resolve($ip) {
  if (self::ip__validate($ip)) {
    $url = gethostbyaddr($ip);
    if ($url) {
      return $url;
    }
  }
  return $ip;
}