944,030 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 6094
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Oct 14th, 2009
0
Re: Block IP country
Click to Expand / Collapse  Quote originally posted by perosf ...
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.
Sponsor
Featured Poster
Reputation Points: 1061
Solved Threads: 951
Disgraced Poster
ardav is offline Offline
6,708 posts
since Oct 2006
Oct 14th, 2009
-2
Re: Block IP country
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 ??
Reputation Points: 10
Solved Threads: 0
Light Poster
Janiceps is offline Offline
49 posts
since Dec 2006
Oct 14th, 2009
0
Re: Block IP country
@Jan:
This is going off-topic, but you need to get a proxy - see here:
http://proxy.org/forum/1175967005.html
Sponsor
Featured Poster
Reputation Points: 1061
Solved Threads: 951
Disgraced Poster
ardav is offline Offline
6,708 posts
since Oct 2006
Oct 14th, 2009
1
Re: Block IP country
Again, off topic, but I think he is trying to get help for this still
Reputation Points: 96
Solved Threads: 124
Master Poster
Will Gresham is offline Offline
728 posts
since May 2008
Oct 15th, 2009
0
Re: Block IP country
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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
perosf is offline Offline
24 posts
since Sep 2009
Oct 15th, 2009
0
Re: Block IP country
So what are you having problems with now? Did you try the bits of code offered previously? Do they work?
Sponsor
Featured Poster
Reputation Points: 1061
Solved Threads: 951
Disgraced Poster
ardav is offline Offline
6,708 posts
since Oct 2006
Oct 15th, 2009
0
Re: Block IP country
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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
perosf is offline Offline
24 posts
since Sep 2009
Oct 16th, 2009
0
Re: Block IP country
Try google translate? I'd like to help but, I can't understand you.
Sponsor
Featured Poster
Reputation Points: 1061
Solved Threads: 951
Disgraced Poster
ardav is offline Offline
6,708 posts
since Oct 2006
Oct 16th, 2009
0
Re: Block IP country
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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
perosf is offline Offline
24 posts
since Sep 2009
Oct 16th, 2009
0
Re: Block IP country
With respect, I did read your first post and have offered some assistance, as below:

PHP Syntax (Toggle Plain Text)
  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:

PHP Syntax (Toggle Plain Text)
  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. }
Sponsor
Featured Poster
Reputation Points: 1061
Solved Threads: 951
Disgraced Poster
ardav is offline Offline
6,708 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Login System - Help me OOPize it!
Next Thread in PHP Forum Timeline: can you help a newbie?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC