cookbooks:devel:pseudovariables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
cookbooks:devel:pseudovariables [2022/04/07 08:18] – [$lsock(expr)] miconda | cookbooks:devel:pseudovariables [2022/04/11 13:24] (current) – geoip2 henningw | ||
---|---|---|---|
Line 2081: | Line 2081: | ||
if($gip(src=> | if($gip(src=> | ||
+ | { | ||
+ | # source and destination from same country | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== $gip2(pvc=> | ||
+ | |||
+ | Variables exported by GeoIP2 module, returning geo-location attributes. The attributes are populated upon calling function **geoip_match2(ipaddr, | ||
+ | |||
+ | **pvc** (container id) is second parameter of geoip_match2(..) and **key** can be: | ||
+ | |||
+ | * cc - country code | ||
+ | * tz - time zone | ||
+ | * zip - postal code | ||
+ | * lat - latitude | ||
+ | * lon - longitude | ||
+ | * dma - dma code | ||
+ | * ips - ip start | ||
+ | * ipe - ip end | ||
+ | * city - city | ||
+ | * area - area code | ||
+ | * regc - region | ||
+ | * regn - region name | ||
+ | * metro - metro code | ||
+ | * contc - continent code | ||
+ | |||
+ | You can call several time **geoip_match(ipaddr, | ||
+ | |||
+ | <code c> | ||
+ | geoip_match2(" | ||
+ | geoip_match2(" | ||
+ | |||
+ | if($gip2(src=> | ||
{ | { | ||
# source and destination from same country | # source and destination from same country |
cookbooks/devel/pseudovariables.txt · Last modified: 2022/04/11 13:24 by henningw