Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4214
Latest: thatsjustit
New This Month: 5
New This Week: 0
New Today: 0
Stats
Total Posts: 42793
Total Topics: 7455
Most Online Today: 51
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 55
Total: 55

Author Topic: Display different ads based on IP adress  (Read 9151 times)

0 Members and 1 Guest are viewing this topic.

Offline access control forum

  • Member
  • *
  • Posts: 31
    • View Profile
    • accesscontrolforum.com
Display different ads based on IP adress
« on: January 04, 2015, 11:50:59 am »
I want to sell ads based on regions of the USA maybe even by state and different countries. I dont see this as a setting inside Ad Seller Pro. The link below seems to be all that I can find and requires adding code.

Is there a setting for ads based on IP address of a visitor/user in Ad Seller Pro?


http://www.smfhacks.com/index.php?topic=7497.0

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #1 on: January 04, 2015, 01:09:43 pm »
We do not have that feature built in. That would require a purchase of geoip database if you want to get state level specific.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline access control forum

  • Member
  • *
  • Posts: 31
    • View Profile
    • accesscontrolforum.com
Re: Display different ads based on IP adress
« Reply #2 on: January 04, 2015, 03:08:35 pm »
I can see that this would be useful to me. I found a free database. Who knows what long term support there will be.

Would it be possible to base it on location in the profile for registered users? Or base on a custom field see pic?


http://dev.maxmind.com/geoip/geoip2/geolite2/

https://www.maxmind.com/en/geoip2-services-and-databases

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #3 on: January 04, 2015, 04:29:10 pm »
I use maxmind a lot for stuff that I do.

The issue with using a custom profile field you will have very limited people who filled that in and doesn't count guests at all.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Brewster

  • Member
  • *
  • Posts: 12
    • View Profile
Re: Display different ads based on IP adress
« Reply #4 on: January 16, 2015, 09:13:23 am »
I would be interested in this feature too.

I wrote an ad system for Wordpress that used maxmind to geo target the ads. It even used the web api and cached the results so that it didnt keep on requesting the location. I'll look up the name of the plugin later - it's been so long since I made any changes to it.

Joe

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #5 on: January 16, 2015, 02:16:25 pm »
I am looking into doing country geoip ads for next update.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #6 on: January 20, 2015, 08:39:24 pm »
Added in 2.5
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline access control forum

  • Member
  • *
  • Posts: 31
    • View Profile
    • accesscontrolforum.com
Re: Display different ads based on IP adress
« Reply #7 on: January 22, 2015, 04:13:55 pm »
Sweet on the countries!!! States or regions of the US on the horizon?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #8 on: January 22, 2015, 08:20:59 pm »
State possibly. I have to see if there is a free database for it. I use one from maxmind it is paid. Not sure if their geolite database has state.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Brewster

  • Member
  • *
  • Posts: 12
    • View Profile
Re: Display different ads based on IP adress
« Reply #9 on: April 12, 2015, 07:49:49 am »
Would you be able to add the ability to use cloudflare's geo location feature as well as maxmind to detect the country please?

More details can be found here: https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do-

Thanks,
Joe

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #10 on: April 12, 2015, 10:24:58 am »
Maybe but geo location is already an option with maxmind seems like they both do the same thing.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Brewster

  • Member
  • *
  • Posts: 12
    • View Profile
Re: Display different ads based on IP adress
« Reply #11 on: April 12, 2015, 12:12:23 pm »
Yes, they both do the same thing. However cloudflare is free and there is no need to keep on updating the database

Offline Brewster

  • Member
  • *
  • Posts: 12
    • View Profile
Re: Display different ads based on IP adress
« Reply #12 on: April 13, 2015, 07:18:06 am »
Looks like this modification to adseller2.php would work?

Code: [Select]
if (isset($_SERVER["HTTP_CF_IPCOUNTRY"])) {
$countrycode = $_SERVER["HTTP_CF_IPCOUNTRY"];
} else {
$ipaddress = $_SERVER['REMOTE_ADDR'];
require_once($sourcedir . '/geoip.php');
$handle = geoip_open($sourcedir . '/GeoIP.dat', GEOIP_STANDARD);
// print_r($handle);
$countrycode = geoip_country_code_by_addr($handle, $ipaddress);
geoip_close($handle);
}
« Last Edit: April 13, 2015, 07:20:17 am by Brewster »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Display different ads based on IP adress
« Reply #13 on: April 13, 2015, 08:17:11 am »
Yeah that would do it.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
6958 Views
Last post August 03, 2006, 09:27:30 pm
by SMFHacks
2 Replies
5513 Views
Last post November 03, 2008, 07:00:59 pm
by SMFHacks
4 Replies
7480 Views
Last post December 31, 2008, 06:16:46 am
by brel
13 Replies
6942 Views
Last post November 15, 2012, 08:18:06 pm
by tekgik
2 Replies
2461 Views
Last post January 24, 2013, 11:36:01 pm
by amwebby

+- Recent Topics

Permissions query by davejo
March 26, 2023, 04:43:48 am

prettyurls - TroubleShooting.wiki by SMFHacks
March 25, 2023, 01:49:35 pm

Download Gallery Option by SMFHacks
March 23, 2023, 09:34:02 am

Lost attachments by pete
March 22, 2023, 10:24:17 am

Additional Permissions by mickjav
March 18, 2023, 05:21:23 am

[Mod]Discord Web Hooks by SMFHacks
March 17, 2023, 08:48:30 am

Site upgrade to 2.1 by SMFHacks
March 12, 2023, 08:51:19 am

Theme/CSS design wanted by mickjav
March 11, 2023, 12:10:11 pm

Category Images by Anmer
March 10, 2023, 06:20:04 am

DownloadsPro - Topic Link by Anmer
March 08, 2023, 03:18:05 pm

Powered by EzPortal