View Full Version : specific ip banners\hyperlinks
how can i make a hyperlink or a banner\picture, that will cahnge for every diffrent ip, what i mean is if i want all pepole coming from the Italy to see specific banner/ or hyperlink , and peple from UK to see diffrent banner\hyperlink, and all pepole from francer to see a diffrent and so on and so on....
How can i do it, I know its possibale becouse advertaizers do it.
Thanks.
Pegasus
01-29-2008, 09:35 AM
It's not done with HTML. At best, it's done with Javascript. I'll just move this over to the appropriate forum for you.
sandstorm
01-29-2008, 09:52 AM
I suggest you use a server-side scripting language like php to grab the users IP.
Visit http://www.ipaddresslocation.org/ which allows you to get ip ranges for various countries and you could build your own database to match the ip with.
I suggest you use a server-side scripting language like php to grab the users IP.
how i do it?
how do i use a server-side scripting to grab users IP?
I'm not soo good at html,php,
please help
sandstorm
01-29-2008, 05:24 PM
This would be a complete php page which you would need to host on a php server.
<?PHP
$ip = $_SERVER['REMOTE_ADDR'];
?>
Thats it. The variable $ip would contain the users IP.
You would need to match the IP using preg_match with IP ranges from http://www.ipaddresslocation.org/ and then determine where the user is from.
Alternatively, you could scrape a site like http://www.geobytes.com/IpLocator.htm and get the relavent data from there.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.