Re: [PHP] IP based redirection

2002-02-04 Thread J.F.Kishor

Hi,


This could be done by having a conf file through which you could
get the IP address of the machine from where the request is come. 

ie..

?
/ This is a seudo 
*---
* This is the conf file conf.php
*---

// gets IP of the machine from where the request is come
$IP = GetEnv(REMOTE_ADDR);
or
// gets IP of the server  
$IP = GetEnv(SERVER_ADDR);

// the ISP's IP

$tamilISP = 192.232.0.232;
$hindiISP = 192.232.0.233;
$kanadaISP = 192.232.0.234;
$telguISP = 192.232.0.235;

if($IP == $tamilISP)
{
  $page = tamil.php;
  //or
  $lang = tamil;
}
elseif($IP == $hindiISP);
{
  $page = hindi.php;
  //or
  $lang = hindi;
}
elseif($IP == $kanadaISP)
{
  $page = kanada.php;
  //or
  $lang = kanada;
}
elseif($IP == $teleguISP)
{
  $page = telegu.php;
  //or
  $lang = telegu;
}

?

You can include the above conf file in other scripts of yours and you and 
do a check according to your need, and display pages according to the
result of the check. 

Good luck 

cheers 
JFK 
kishor
Nilgiri Networks.

On Sat, 2 Feb 2002, [EMAIL PROTECTED] wrote:

 Could you please help us, to redirect some of our pages to based on IP
 address. We have used SmartRedirect program but it is not working on
 with some of our ISP's IP address. We are located at India, and like
 to have some language specific pages to be displayed to our Indian
 user while english language to other world. Thanks,
 
 Hemant Kumar
 DInsol.com
 http://www.dinsol.com/
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] IP based redirection

2002-02-03 Thread Sweet Shikha

Could you please tell us:We would like to redirect the
user based on their
Country so we are collecting their IP address. We have
used SmartRedirect PHP software to do this but on some
of our ISP it is not working, it shows you are from
unknown country. We are located at New Delhi, India.
Could you please tell us how we can do this in
smartand effective way.

Thanks,

Shikha

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] IP based redirection

2002-02-03 Thread Sweet Shikha


Could you please tell us:

We would like to redirect the user based on their
Country so we are collecting their IP address. We have
used SmartRedirect PHP software to do this but on some
of our ISP it is not working, it shows you are from
unknown country. We are located at New Delhi, India.

Could you please tell us how we can do this in smart
and effective way.

Thanks,

Shikha

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] IP based redirection

2002-02-01 Thread [EMAIL PROTECTED]

Could you please help us, to redirect some of our pages to based on IP 
address.
We have used SmartRedirect program but it is not working on with some of 
our ISP's IP address. We are located at India, and like to have some 
language specific pages to be displayed to our Indian user while english 
language to other world.
Thanks,

Hemant Kumar
DInsol.com
http://www.dinsol.com/