Mountain Dew was having a promotion where you enter codes from bottle caps into a website to collect points. A bottle of soda was 1 point, a case of cans was like 10 or something.
I saw that they had several Xbox packages available and they were going for something like 500 points. Seemed attainable.
So I started drinking large volumes of Mountain Dew and digging caps out of recycle bins. People also gave me their points as they knew I was collecting them.
I would check the website periodically and figured out the way they did it is they would release certain “packages” at unannounced times. I’d check one day and see that there are 4 packages “coming soon” and then I’d check the next day and there would only be 3 packages and the last one is sold-out.
It was apparent that each game system package would sell-out completely in a very short period of time and it would basically be impossible to actually get the game system. I’m at work all day every day and I can’t get to the soda website from work, nor do I have time for that anyway.
Fortunately – a friend of mine was collecting caps also. And he is basically a computer genius. I consider myself a good programmer – but this guy’s really good.
Anyway, he thought of an idea to write a perl script that would poll the Mountain Dew website every 5 minutes or so, looking for key information in the page.
He noticed that when a package was not available, it would have the “Coming Soon” image on the web site, then when the package was available, the image would go away.
So, he wrote his perl script to parse the page and if it didn’t find the “coming soon” image, it would notify him.
He set it up so it would send him an email and an SMS message when an Xbox system was available.
I was taking a walk outside one day and my Friend nearly runs me over with his car while I’m on the sidewalk. He lays on the horn and tells me to get in because he got an SMS from his program.
I jump in, we drive to his house. We both logged in and cashed in our points to get our free Xbox packages.
The package sold out like 10 minutes later, as they all did.