Sorry for lately reply. I was so busy last week. ip2cc provides a few APIs for you to call as follow. $co = ip2cc_get_country("203.150.224.25"); print_r($co->country_code2); print_r($co->country_code3); print_r($co->country_name); print_r($co->net_name); print_r($co->as_number); Otherwise, you may pass the country object to theming functions as below. print_r(theme("ip2cc_flag", $co, "203.150.224.25")); print_r(theme("ip2cc_ip_flag", "203.150.224.25")); print_r(theme("ip2cc_ip_flag_long", "203.150.224.25"))
Hello, can this program be used to do some if ... then operations? For example, I would like to use it to decide if my user should see a banner advertisement (if he comes from Guatemala or the USA) else show him a google adsense ad!!!
I have content on a website... Some for US residents, some for UK residents. Can I pass the browser country information, directly to views, as a argument, to display only nodes with the taxonomy term USA, or if the browser is in the UK. THANKS!!
Sample Code?
sample code for ip2cc
error
sorry about that
Private Addresses
yes, sir!
Doesn't recognize Israeli websites and their IP addresses
Oops, not updated version of ipdb
IF IP = country then...
sorry
yes
How to put output in a block..
putting ip2cc in a block
Interesting! You can only do this for each node. In particular, the url must begin by
node/
.test
test
Test the IP detect
Can Views get the information?
Post new comment