The current price of tea in China is:
$prices = array( 1.40, 3.01, 6.98, 1.15, "gerbils");
$currencies = array( "\$", "€", "¥", "£");
$price = $prices[rand(0,count($prices)-1)];
$currency = $currencies[rand(0,count($currencies)-1)];
if ( is_numeric($price) )
{
echo "${currency} " . sprintf("%01.2f", $price);
}
else
{
echo "${currency} " . $price;
}
$results = array( "It makes your butt look big.", "Well, just look at the mess you're in... believe it or not, whose fault is it? Not yours, heavens, no. It's the price of tea. In China.", "The Boston Red Sox, in 2004, were able to afford yet one more year of Manny Ramirez's contract, which allowed them to win the World Series (to say nothing of the pitching), all thanks to a great deal John Henry, principal owner of the Red Sox, got on a box of tea from China.", "Nothing. Nothing whatsoever.", "Everything.", "You will know when it is right for you to know. And no sooner. So stop asking.", "It makes your butt look marginally smaller.", "Turnips!");
$otherPrice = "68.27";//showQuote();
echo "
";
//echo "\"" . $otherPrice . "\"";
$otherPrice = 1 + $otherPrice;
$maxPrice = $price + $otherPrice;
echo " with a max bid of ... " . number_format($maxPrice, 2);
function showQuote() {
$url = "http://services.xmethods.net";
$page = "/soap";
$post_string = "
AAPL
";
$header = "POST ".$page." HTTP/1.0 \r\n";
$header .= "User-Agent: Mac OS X; WebServicesCore.framework (1.1.0)";
$header .= "Host: services.xmethods.net:80";
$header .= "Content-type: text/xml \r\n";
$header .= "Soapaction: \"\"\r\n";
$header .= "Content-length: ".strlen($post_string)." \r\n";
$header .= "Connection: close \r\n\r\n";
$header .= $post_string;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
$data = curl_exec($ch);
if (curl_errno($ch)) {
print curl_error($ch);
} else {
curl_close($ch);
}
// Now parse the data returned to get our float price...
$xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE,1);
xml_parse_into_struct($xml_parser, $data, $vals, $index);
xml_parser_free($xml_parser);
//print_r($vals);
$attributes = $vals[3];
foreach($attributes as $attr) {
/// uhh, yeah, this is uuuuugly.
$finalPrice = $attr;
}
return $finalPrice;
}
//$client = new SoapClient("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
//print($client->getQuote("ibm"));
?>
disclaimer: not to be confused with a butterfly's wings flapping in China. This price is scientifically derived from numbers only tangentially related to the actual price of tea in China, which we have found is profoundly more accurate than actual prices paid for tea in China. How this affects you, your child, or an acquaintance is derived, again, scientifically, by a patent-pending method we'd love to discuss, but can't, at this time. It has little to nothing to do with the technology behind the magic eight ball. A brief overview of the connections between the price of tea in China and these results (both the price and actual bearing on events) is illustrated here.
What does that have to do with the price in tea in China?
$result = $results[rand(0,count($results)-1)];
echo $result;
?>
Price of Tea in China, hosted by Supertart.com. ©2005
Get yourself on the hottest, the newest*, the socialest** network to hit the airwaves!
Social! a new kind of Social Experience.
* Warning: May not actually be the newest.
** Warning: May not be terribly social.
Social!
Get yourself on the hottest, the newest*, the socialest** network to hit the airwaves! Social! a new kind of Social Experience.* Warning: May not actually be the newest.
** Warning: May not be terribly social.