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
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
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.
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
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.
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.
Bookmarks