| | |
Block IP country
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
0
#11 Oct 14th, 2009
Ahh. I see. Sorry, I thought you were just trying to implement a convenient way for users to go to a language-specific page. My mistake. Well, in that case try the code posted previously. Instead of the actual redirects you could echo the $code and supply a manual $IP to check if it works before implementing.
If you don't reply to your own thread or you can't find the solved link - you're off my Christmas list - permanently! Bah humbug!
0
#13 Oct 14th, 2009
@Jan:
This is going off-topic, but you need to get a proxy - see here:
http://proxy.org/forum/1175967005.html
This is going off-topic, but you need to get a proxy - see here:
http://proxy.org/forum/1175967005.html
If you don't reply to your own thread or you can't find the solved link - you're off my Christmas list - permanently! Bah humbug!
1
#14 Oct 14th, 2009
Again, off topic, but I think he is trying to get help for this still
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Sep 2009
Posts: 22
Reputation:
Solved Threads: 0
0
#19 Oct 16th, 2009
1.OK. As I noticed you have not read my first post I have written from there to begin. I set some things I have found but do not know how my index.php page instance to connect to all those things.
2.And all that I need to be able to automatically control the site depending on if the visitors are not from Italy will open another page while those from Italy will enter the site properly.
I hope I understood what I do
3.Can the second question to submit your idea how it would an easy way to make
Thanks a lot
2.And all that I need to be able to automatically control the site depending on if the visitors are not from Italy will open another page while those from Italy will enter the site properly.
I hope I understood what I do
3.Can the second question to submit your idea how it would an easy way to make
Thanks a lot
0
#20 Oct 16th, 2009
With respect, I did read your first post and have offered some assistance, as below:
You didn't reply or comment on the code. Which part does not work?
If you want Italy-based users to go to the site but others to go elsewhere:
PHP Syntax (Toggle Plain Text)
$code = strtolower(geoip_country_code_by_addr($GeoIPDatabase, $IP)); switch($code){ case 'de': header("Location: de.php"); //strictly speaking this should be the full url break; case 'it': header("Location: it.php"); break; default: header("Location: en.php"); break; }
You didn't reply or comment on the code. Which part does not work?
If you want Italy-based users to go to the site but others to go elsewhere:
PHP Syntax (Toggle Plain Text)
$code = strtolower(geoip_country_code_by_addr($GeoIPDatabase, $IP)); if($code != 'it'){ header("Location: whateverpage.php"); //strictly speaking this should be the full url }
If you don't reply to your own thread or you can't find the solved link - you're off my Christmas list - permanently! Bah humbug!
![]() |
Similar Threads
- Country Associated with Domain: How/Where? (Domains and DNS)
- Block a host (Network Security)
- How to block China subnet? (Network Security)
- Which Country? (Geeks' Lounge)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: Login System - Help me OOPize it!
- Next Thread: can you help a newbie?
Views: 2319 | Replies: 50
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cookies cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery js limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql stored structure subdomain syntax system table tutorial update updates upload url validation validator variable video web xml youtube






