SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2011
    Location
    USA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question [Advertising Script] keyword based advertising

    Ok- I have a advertising php script that I code and sell. I'm always making improvements and adding new features to it.

    Recently, I was asked about the 'keyword based advertising'.

    What I don't know or clueless about is how does it works from the php programming side?

    Is it possible to write a php code to somehow automatically scan/look/search the page for keyword(s) pulled from mysql?

    Or would I have to manually setup ad codes like this:
    Code:
    http://www.domainname.com/ads/ad.php?c=1&k=keyword_does_here
    Code:
    SELECT * FROM ads WHERE id = '".sql_quote($id)."' AND status = 'active' AND credits > 0 AND camid = '".sql_quote($c)." AND `keywords` LIKE '%".$_GET['keyword']."%'

    Ad #1- keywords: car, truck, bus
    Ad #2- keywords: web, design, programming
    Ad #3- keyword: (blank- meaning it will show on all pages)

    If page has the word truck so ads with keyword 'truck' will show
    If page have words 'bus', 'web' so ads with those keywords will show
    If no matched keywords found on the page then random ads will show


    Am I thinking right? The more I'm thinking about it, the more I get confused or lost.

    I tried search Google for code info (how it works from programming side) but all I found was explaining how to use keyword based advertising for Google Adsense, Yahoo, blah blah unrelated.

  2. #2
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is 'targeted advertising' scanning the content of a page and choosing which ads to display on that page to relate to the content.

    Keyword based advertising is the same thing, but the ads are generally shown on teh search results page of the search engine.

    Your description fits, the more words you can match the more related the ad is to the content, in theroy
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •