Topic: Ads Triggered by Keywords Used to Get To My Site From Search Engines (Read 988 times)
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« on: Feb 17, 2007, 12:36:14 PM »
i wish to show relevant ads based on keywords used by my visitors to get to my site via the search engines. certain keywords will trigger the display of ads. this is what i got so far...
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« Reply #3 on: Feb 17, 2007, 04:17:04 PM »
great! what if i wish to accomodate all search engines? and how can i trigger the ads when certain keywords come up? i know i can figure this one out for myself if you guys can just point me to some examples. thanks again.
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 7945
40623 credits Members referred : 3
« Reply #4 on: Feb 18, 2007, 02:55:05 AM »
It would be very difficult to do this for every search engine , and as in most sites the 80%+ of the search engine traffic is from google I guess it is not really important to implement it.
When you are talking about ads, do you mean adsense or something else?
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« Reply #5 on: Feb 18, 2007, 08:31:50 AM »
i will popunder affiliate merchant's page.
is this correct?
Code:
<?php $ref = parse_url($_SERVER['HTTP_REFERER']);
if ( strstr($ref['host'], 'google') ) { $qStr = urldecode(array_shift(explode('&', array_pop(explode('q=', $ref['query']))))); echo $qStr; // load adwords1 list $adwords1 = @file("adwords1.txt");
// open popunder page 1 if keyword is found in adwords1 file if (!in_array($qStr, $adwords1)) { // SO HOW DO YOU OPEN POPUNDER HERE? // load adwords2 list $adwords2 = @file("adwords2.txt");
// open popunder page 2 if keyword is found in adwords2 file if (!in_array($qStr, $adwords2)) { // SO HOW DO YOU OPEN POPUNDER HERE? }
Pinoy Webmaster
.com pimp
Gender:
Posts: 1126
6048 credits Members referred : 0
Philippine Beaches
« Reply #6 on: Feb 19, 2007, 04:23:52 PM »
hey Nik,
im almost finished with the script im working on. theres just this one itty bitty part that is lacking.
Code:
<?php // if for example i already obtained the keywords my surfer used to enter my site...
$keyword = "a bottle of tomato catsup";
// and i want to keep an eye out for catsup in the keywords so i will know when to display a catsup ad, how should i do it in the if/else conditional statement?
if (array($keyword) == "catsup") { // do you have a tutorial for this part here? this is where im facing a blank wall right now // open an advertisement } else { // do nothing } ?>
i hope you will help me. thanks!
« Last Edit: Feb 19, 2007, 04:29:36 PM by vbignacio »