Help redirection

ranjeet

New Member
Messages
45
Reaction score
0
Points
0
how to make this kind of redirection
Indian user to in.mysite.com
australian user to au.mysite.com and so on.

i want automatic redirection not manual:cool:
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
well, What i would do would use PHP to grab the visitor's IP address,

then run it against a database of hostnames/ips that point to different countries.

Then you would get the output from the database, and use the information to redirect using PHP, or a meta refresh, w/e floats your boat.

You can probably find a company or site that updates their database like this often on google.
 

phpasks

New Member
Messages
145
Reaction score
0
Points
0
one include block create for which site use

if IN - Indian user than move to in.mysite.com
IP through checking which country user.

<?php
/* This will give an error. Note the output
* above, which is before the header() call */

if($ip_country!="India")
header('Location: http://www.in.mysite.com/');
?>
 
Top