yosaid

msg:1574535 | 10:10 pm on Feb 2, 2006 (gmt 0) |
Willmullis, thanks for the encouraging news. Any new tricks to overcome on phpadsnew? I mean everyone is complaining about this ad program, what are the main things to watch for when implementing the geotargeting? I need to download this program and burn my brains out. Thanks.
|
willmullis

msg:1574536 | 11:15 pm on Feb 2, 2006 (gmt 0) |
I already had phpadsnew installed which is a very easy program to install on its own. Once I figured out how to install the geoip database it was easy. I'll try to explain it as easily as possible. 1. Download the GeoLite Country Database from Maxmind 2. It is a tar so you need a utility to extract it 3. You should now have a .dat file 4. Upload it to your server(I found out it can be anywhere) 5. Log into phpadsnew, goto settings and then pull down and select "geotargetting". 6. There should be a checkbox for geoip and then put in the path for the .dat file you uploaded. for example /home/usr/public_html/geo/GeoIP.dat That should be about it.
|
sirkei

msg:1574537 | 2:50 am on Feb 3, 2006 (gmt 0) |
i've pretty much done all the following. But i would like to implement google adsense as alternative ads for visitors outside usa. SO i setup a 50:50 probabilty first for both ads and set the delivery options of ypn to show ads only to country USA. But it doesnt seem to work well because when i was testing the page, i see both ads showing at the same time. That is why i stopped the ad immediately and put back ypn only. Hope somebody can help me out. thanks.,
|
garyr_h

msg:1574538 | 3:18 am on Feb 3, 2006 (gmt 0) |
I meant to post this before, but it could do some people some good:
<? $ip = $_SERVER['REMOTE_ADDR']; include("geoip.inc");$gi = geoip_open(dirname(__FILE__)."/GeoIP.dat",GEOIP_STANDARD); if (geoip_country_code_by_addr($gi, $ip)!= US) { include('adsense.php'); } else { include('ypn.php'); } geoip_close($gi); ?>
Place this in an include, and each time you want to display the ads just use this. You may want to work on the script more if you want to inhance it. You can change the includes to the actual javascript or put random numbers there for different ad testing, etc. Just remember to put the .dat and .inc MaxMind files on your server for this to work. Also, you may want to check for updates to it often as the IP addresses change often.
|
sirkei

msg:1574539 | 4:00 am on Feb 3, 2006 (gmt 0) |
| Just remember to put the .dat and .inc MaxMind files on your server for this to work. |
| Where do you get the .inc file? Are you not using the free geolite country datatbase? or are you using the paid one?
|
willmullis

msg:1574540 | 2:26 pm on Feb 3, 2006 (gmt 0) |
What Gary mentioned would work if your not interested in phpadsnew. Phpadsnew is all automated once you get it configured.
|
garyr_h

msg:1574541 | 5:35 pm on Feb 3, 2006 (gmt 0) |
The files are located within the free database. I *think* you have to download another file from the MaxMind site in order for it to work. I'm sorry it has been a while since I have done this, but do a search for [GeoIP.inc] on a popular search engine and it should come up #1. As for the GeoIP.dat file, I believe it is located within the free GeoIP Country database you can download from the same site. The code I posted before is php, I forgot to mention. So in order to use it your server must have php. If someone can post an asp version please do so as it will help many. I will also work on a javascript version of the same one.
|
danimal

msg:1574542 | 7:29 pm on Feb 3, 2006 (gmt 0) |
>>>Just remember to put the .dat and .inc MaxMind files on your server for this to work.<<< there is no .inc file on the free version of geoip that phpadsnew uses, it runs strictly off of the geoip.dat file. when you update the geoip.dat, put it in a new directory, and re-direct phpadsnew to that directory... i had a situation where i just wrote over the top of the old geoip.dat, and it stopped showing ads :-/
|
garyr_h

msg:1574543 | 8:05 pm on Feb 3, 2006 (gmt 0) |
danimal, please refer to the post directly above yours, it states how to get the .inc file. It is free to use and you are able to download it for free from the MaxMind website. I told how to get the file only, however, it is also packaged and can be downloaded along with other files in order to create a program using C, but you only need this one file for it to work with PHP.
|
danimal

msg:1574544 | 10:51 pm on Feb 3, 2006 (gmt 0) |
gary, we are talking about two different applications that utilize the geoip.dat database. my point was that you do not need the geoip.inc file for phpadsnew.
|
| This 40 message thread spans 2 pages: < < 40 ( 1 [2] ) |
|
|