www.webdeveloper.com
Results 1 to 9 of 9

Thread: Php ad

  1. #1
    Join Date
    Aug 2009
    Posts
    79

    Exclamation Php ad

    I'm creating an ad program for my site and right now i'm trying to figure out how i can get people who bid a higher price to be shown more then some one with a low bid

  2. #2
    Join Date
    Jun 2010
    Posts
    92
    Depends on what sorting you want to achieve?

    Are you working based on averages or just on a particular program?

    When you say shown more, you more higher % of them being shown, or are they are just going to have a priority always?

    You could just sort by highest bidding price?

    Sorry I am not sure I understand it

  3. #3
    Join Date
    Aug 2009
    Posts
    79
    sorry basically what i'm dong is having a never ending bidding war for ad space so people who bid high get see more in the ad space they bid on compared to others who bid low

  4. #4
    Join Date
    Mar 2010
    Posts
    2,803
    it depends on how you are displaying their ads on your website.

    Assuming you have a banner wuth rotating ads from your advertisers. Smewhere in your database you will need a record of who your advertisers are, how much they bid for their ads to be displayed and their ad images.

    You can then use a combination of setInterval() and setTimeout() to display their ad images for the required time according to the amount they bid for each image or just pro-rata the display time of all the images according to the amounts bid for each image.

    You then have a continous loop cycling through the ad images.

    Without knowing more details on how your bidding system is structured the above is just food for thought.
    Last edited by tirna; 07-08-2010 at 12:45 AM.

  5. #5
    Join Date
    Aug 2009
    Posts
    79
    basically like how the ads are displayed on myspace i do have a record of the clients and how much they bid

  6. #6
    Join Date
    Mar 2010
    Posts
    2,803
    in your record of how much the clients bid, is their bid so much per minute, hour or some other time period?

    For example, if your client bids $100, what will you give them in return in terms of advertising space and time and number of images thay can use?

  7. #7
    Join Date
    Aug 2009
    Posts
    79
    the bid is just to be placed in that spot they are on that spot as long as the user is on the page if the user navigates away or refreshes the page the ad spot will be given to someone else how ever someone with a high bid will be shown in the spot they bid for more often then someone with a low bid

  8. #8
    Join Date
    Mar 2010
    Posts
    2,803
    I'm having difficulty understanding exactly what you are trying to say mainly because there is no punctuation in your post and I have to spend extra time reading backwards and forwards trying to work out where one sentence stops and another starts.

    Basically as I see what you are trying to say, it should be fairly straight forward to just pro-rata the time of each add or simply display it for a fixed time depending on the size of the bid as I suggested earlier.

    Hopefully someone else will be able to help you more.

    Good luck

  9. #9
    Join Date
    Jan 2009
    Posts
    3,346
    It sounds like you are wanting to sort using a weighted algorithm. Is that accurate? If so try searching around for a some and I'm sure it'll make much more sense. Then if you get stuck with implementation come back here for help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles