get the country of visitor and display content based on that


Posted on 16th Feb 2014 07:03 pm by admin

Hello all,

I have seen that Google analytics can tell you where a visitor is coming from and I want to do something similar. But I would like to add the functionality of redirecting a user based on his location

Example:
if a users location is from the "US" I would like to redirect all the links on the site to include /us/ after the domain. If the user comes from anywhere outside the US is would like the links to be normal.

Any Ideas??

220 Like 19 Dislike
Previous php-forum Next php-forum
Other php-forum

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

FROM_UNIXTIME($phpdate);
Hello,

I tried to use this :

$date = FROM_UNIXTIME($phpdate);

ANd I was t

session variables not working anymore
hello,
i use sessions to handle authentication within my site. my host has been changing a lot of

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Convert .fdf to .pdf
I currently have a web form that uploads the form data to an .fdf file and emails it.

However

Where am I going wrong
Been trying to work this out for hours

I have two tables called 'Genres' and 'Films'. Genre

Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:

Create a form of 2 numbers input and find the greatest.
Hi, everybody.

I have a homework in my training of php, which ask you to make a form that ask

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash