Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43293
Total Topics: 7522
Most Online Today: 79
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 65
Total: 65

Author Topic: Display different ads based on IP adress  (Read 9537 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: 16451
    • 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: 16451
    • 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: 16451
    • 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: 16451
    • 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: 16451
    • 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: 16451
    • 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: 16451
    • 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
7266 Views
Last post August 03, 2006, 09:27:30 pm
by SMFHacks
2 Replies
5717 Views
Last post November 03, 2008, 07:00:59 pm
by SMFHacks
4 Replies
7993 Views
Last post December 31, 2008, 06:16:46 am
by brel
13 Replies
8484 Views
Last post November 15, 2012, 08:18:06 pm
by tekgik
2 Replies
3161 Views
Last post January 24, 2013, 11:36:01 pm
by amwebby

+- Recent Topics

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

Powered by EzPortal