Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
09-30-2010, 09:44 AM | #1 |
Confirmed User
Join Date: Feb 2003
Location: In bed asleep
Posts: 803
|
How to show a geoip warning page without using htaccess?
Any tips on how to show a geoip warning page when someone visits a site without using htaccess? I don't want to use htaccess because of server load on high traffic sites.
Thanks |
09-30-2010, 10:28 AM | #3 |
Confirmed User
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
|
Indeed, MaxMind is kinda the defacto standard for GeoIP in terms of PHP
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com |
09-30-2010, 10:28 AM | #4 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,883
|
can do it with php or javascript, dozens of ways actually depending on what exactly you are trying to acomplish...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
09-30-2010, 10:30 AM | #5 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: 20 00'24.00" N, 75 09'00.00 W
Posts: 6,882
|
MaxMind of course. That's kickass.
__________________
Affordable Quality Web Hosting |
09-30-2010, 10:36 AM | #6 |
Confirmed User
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
|
PHP Code:
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com |
09-30-2010, 10:41 AM | #7 |
Registered User
Join Date: Nov 2009
Posts: 62
|
U can use php & mysql IP database.
ip2nation.com, U can find instructions how to use, I found it 95% accurate, and U are not depend on the third party. |
09-30-2010, 11:57 AM | #8 | |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
Quote:
.htaccess is the fastesT way and lowest server load, where do you get your info from?
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
|
09-30-2010, 12:02 PM | #9 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
solution is to use an external file with htaccess geoip so the initial page loads faster. i.e. instead of serving page after checking htaccess , serve page first , call htaccess from an external file such as a javascript
__________________
hatisblack at yahoo.com |
|
09-30-2010, 12:24 PM | #11 |
Confirmed User
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
|
.htaccess should not ever be used unless you don't have control over your own web server...
In fact I'd highly recommend you don't run Apache... it's bloated and ass slow compared to newer web servers... You can't really beat nginx serving PHP via Fast-CGI. I've taken 12 box Apache deployments down to 4 nginx boxes and still had less load than all 12 boxes running Apache...
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com |
09-30-2010, 03:09 PM | #12 |
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
|
php + session
php or js + cookie
__________________
Make a bank with Chaturbate - the best selling webcam program Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!! PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email: |
10-03-2010, 02:15 AM | #13 |
Confirmed User
Join Date: Feb 2003
Location: In bed asleep
Posts: 803
|
Thanks for all the replies. Based on language is a good idea.
My sites are in English and I only want to pop a warning page for one country and based on the browser language would be fine. Also I don't want to mess up my SE rankings. Is there a really simple way to accomplish this? |
10-03-2010, 02:22 AM | #14 |
Confirmed User
Join Date: Feb 2003
Location: In bed asleep
Posts: 803
|
With regards to not wanting to mess up SE rankings for showing a warning page for one specific country, would a Javascript redirect be a good idea as I don't think SE bots parse javascripts?
|
10-03-2010, 08:35 AM | #15 |
Confirmed User
Join Date: Feb 2003
Location: In bed asleep
Posts: 803
|
Bump for me
|
10-03-2010, 08:53 AM | #16 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,937
|
Quote:
Code:
<?php $lang = ($_SERVER['HTTP_ACCEPT_LANGUAGE']); if(preg_match("zh", $lang)) { header("location: http://www.domain.com/china.html"); } else { header("location: http://domain.com/"); } ?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. WP Stuff |
|