Block IP country

Reply

Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
0
  #11
Oct 14th, 2009
Originally Posted by perosf View Post
So map will be paying so I want to different parts of the two groups example Italy, where the price will be a while for other countries will be different because I want to IP-distinguishes it to you directly to the page that opens necessary.
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!
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 49
Reputation: Janiceps is an unknown quantity at this point 
Solved Threads: 0
Janiceps Janiceps is offline Offline
Banned
 
-2
  #12
Oct 14th, 2009
so how do you unblock the IP adress if lets say, eurosport is streaming Soccor and i want to see it but when you click livefeed, it saids it is unavailable in your cournty cause your IP adress ??
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
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
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!
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 525
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 86
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Posting Pro
 
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 22
Reputation: perosf is an unknown quantity at this point 
Solved Threads: 0
perosf perosf is offline Offline
Newbie Poster
 
0
  #15
Oct 15th, 2009
I think my question was very clearly written that I do ask you to help me and write if possible. the proxy can not enter but I'm not interested and do not need to be commented

Thanks a lot
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
0
  #16
Oct 15th, 2009
So what are you having problems with now? Did you try the bits of code offered previously? Do they work?
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!
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 22
Reputation: perosf is an unknown quantity at this point 
Solved Threads: 0
perosf perosf is offline Offline
Newbie Poster
 
0
  #17
Oct 15th, 2009
to me does not work because the post and asked someone to try and say. So if you try and write if you work with.

Thanks a lot
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
0
  #18
Oct 16th, 2009
Try google translate? I'd like to help but, I can't understand you.
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!
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 22
Reputation: perosf is an unknown quantity at this point 
Solved Threads: 0
perosf perosf is offline Offline
Newbie Poster
 
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
0
  #20
Oct 16th, 2009
With respect, I did read your first post and have offered some assistance, as below:

  1. $code = strtolower(geoip_country_code_by_addr($GeoIPDatabase, $IP));
  2.  
  3. switch($code){
  4. case 'de':
  5. header("Location: de.php"); //strictly speaking this should be the full url
  6. break;
  7. case 'it':
  8. header("Location: it.php");
  9. break;
  10. default:
  11. header("Location: en.php");
  12. break;
  13. }

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:

  1. $code = strtolower(geoip_country_code_by_addr($GeoIPDatabase, $IP));
  2.  
  3. if($code != 'it'){
  4. header("Location: whateverpage.php"); //strictly speaking this should be the full url
  5. }
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!
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the PHP Forum


Views: 2319 | Replies: 50
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC