One of the most annoying things about Woot.com is that it doesn't list the prices of past items, even during Woot-offs, so you can't regret not staying up till four to buy that $10 RC copter. Often, there will be Woot-bots that post the item's price on Woot's discussion boards, but sometimes when Woots appear in quick successions, the bots miss the price.

So, I made the following script to simplify our price-finding task. It works for all past Woots (for current ones, just go to woot.com). Paste the link to the blog or discussion page of the corresponding item, and the script will tell you its price (Click read more for the form). Disclaimer: Accuracy not guaranteed.

\n"; if($callback and $line = $callback($line)) { return $line; } $content .= $line; } @fclose($socket); return $content; } return false; } function get_discussion($line) { static $in_footer; if (!$in_footer) { if (preg_match("#blogFooter#", $line)) { $in_footer = true; } } if ($in_footer and preg_match("#href=\"(http://www\.woot\.com/Forums/ViewPost\.aspx\?PostID=\d+)\"#", $line, $match)) { file_get_contents_external($match[1], "get_javascript"); return true; } return false; } function get_javascript($line) { if(preg_match("#script src=\"(http://www\.woot\.com/scripts/dynamic\.aspx\?control=salesummary&saleid=\d+)\"#", $line, $match)) { file_get_contents_external($match[1], "get_fields"); return true; } return false; } function get_fields($line) { if (preg_match("#Order pace: ([\.,\d]+)m ([\.,\d]+)s#", $line, $match)) { $pace = get_number($match[1]) * 60 + get_number($match[2]); } if (preg_match("#Woot wage: \\$([\.,\d]+)[^\d]#", $line, $match)) { $wage = get_number($match[1]); echo "

The item costs $".round($wage * $pace / 3600, 2)." + $5 shipping.

"; return true; } return false; } function get_number($numStr) { return preg_replace("/[^0-9\.]/", "", $numStr); } if($_POST['wooturl']) { echo "

Loading ".htmlspecialchars($_POST['wooturl'])."...

"; file_get_contents_external($_POST['wooturl'], preg_match("#Blog#", $_POST['wooturl']) ? "get_discussion" : "get_javascript"); } ?>

If you liked this script, don't forget to go here to Digg this!