Saturday, March 28, 2009

IPL 2009: Schedule



Wednesday, 25 February , 2009, 18:06
Last Updated: Friday, 27 March , 2009, 10:03

Date Match Venue Time (IST)
April 18 Rajasthan Royals vs Royal Challengers Cape Town 4pm
Mumbai Indians vs Chennai Super Kings Cape Town 8pm
April 19 Kolkata Knight Riders vs Deccan Chargers Cape Town 4pm
Delhi Daredevils vs Kings XI Punjab Cape Town 8pm
April 20 Royal Challengers V Chennai Super Kings Port Elizabeth 4pm
April 21 Rajasthan Royals v Mumbai Indians Durban 4pm
Kolkata Knight Riders v Kings XI Punjab Durban 8pm
April 22 Delhi Daredevils v Chennai Super Kings Durban 4pm
Royal Challengers v Deccan Chargers Cape Town 8pm
April 23 Kolkata Knight Riders v Rajasthan Royals Port Elizabeth 4pm
April 24 Kings XI Punjab v Royal Challengers Johannesburg 4pm
April 25 Kolkata Knight Riders v Chennai Super Kings Cape Town 4pm
Deccan Chargers v Mumbai Indians Durban 8pm
April 26 Rajasthan Royals v Kings XI Punjab Cape Town 4pm
Royal Challengers v Delhi Daredevils Port Elizabeth 8pm
April 27 Kolkata Knight Riders v Mumbai Indians Cape Town 4pm
Chennai Super Kings v Deccan Chargers Durban 8pm
April 28 Delhi Daredevils v Rajasthan Royals Pretoria 4pm
April 29 Mumbai Indians v Kings XI Punjab Durban 4pm
Kolkata Knight Riders v Royal Challengers Durban 8pm
April 30 Delhi Daredevils v Deccan Chargers Pretoria 4pm
Rajasthan Royals v Chennai Super Kings Pretoria 8pm
May 1 Royal Challengers v Kings XI Punjab East London 4pm
Mumbai Indians v Kolkata Knight Riders Durban 8pm
May 2 Rajasthan Royals v Deccan Chargers Johannesburg 4pm
Chennai Super Kings v Delhi Daredevils Port Elizabeth 8pm
May 3 Mumbai Indians v Royal Challengers Durban 4pm
Kings XI Punjab v Kolkata Knight Riders East London 8pm
May 4 Deccan Chargers v Chennai Super Kings Port Elizabeth 4pm
May 5 Delhi Daredevils v Kolkata Knight Riders Durban 4pm
Kings XI Punjab v Rajasthan Royals Durban 8pm
May 6 Mumbai Indians v Deccan Chargers Pretoria 4pm
May 7 Kings XI Punjab v Chennai Super Kings Pretoria 4pm
Royal Challengers v Rajasthan Royals Pretoria 8pm
May 8 Delhi Daredevils v Mumbai Indians East London 4pm
May 9 Deccan Chargers v Kings XI Punjab Bloemfontein 4pm
Chennai Super Kings v Rajasthan Royals Port Elizabeth 8pm
May 10 Kolkata Knight Riders v Delhi Daredevils East London 4pm
Royal Challengers v Mumbai Indians Johannesburg 8pm
May 11 Deccan Chargers v Rajasthan Royals Bloemfontein 4pm
May 12 Royal Challengers v Kolkata Knight Riders Pretoria 4pm
Kings XI Punjab v Mumbai Indians Pretoria 8pm
May 13 Deccan Chargers v Delhi Daredevils Durban 4pm
May 14 Mumbai Indians v Rajasthan Royals Durban 4pm
Chennai Super Kings v Royal Challengers Durban 8pm
May 15 Kings XI Punjab v Delhi Daredevils Kimberley 4pm
May 16 Chennai Super Kings v Mumbai Indians Johannesburg 4pm
Deccan Chargers v Kolkata Knight Riders Port Elizabeth 8pm
May 17 Rajasthan Royals v Delhi Daredevils Kimberley 4pm
Kings XI Punjab v Deccan Chargers Johannesburg 8pm
May 18 Chennai Super Kings v Kolkata Knight Riders Pretoria 4pm
May 19 Delhi Daredevils v Royal Challengers Johannesburg 4pm
May 20 Chennai Super Kings v Kings XI Punjab Durban 4pm
Rajasthan Royals v Kolkata Knight Riders Durban 8pm
May 21 Deccan Chargers v Royal Challengers Pretoria 4pm
Mumbai Indians v Delhi Daredevils Pretoria 8pm
May 22 Semi Final 1 Pretoria
May 23 Semi Final 2 Johannesburg
May 24 Final Johannesburg
Note: Please note this is a tentative schedule and subject to change

Accessing Yahoo! Finance from PHP

How to Use PHP to Obtain Stock Quotes from Yahoo! Finance


function show_stock_quotes ($stock_list) {

The function will, by default, return the details of some of the stock markets:

if (! $stock_list) {
$stock_list = "^IXIC,^DJA,^NIN,^FTSE";
}

The function will then use either an input list or the default list to create the correct url:

$url = "http://quote.yahoo.com/d/quotes.csv?s="
. $stock_list . "&f=nl1c1&e=.csv";

and then read in the data stream from the Yahoo! Finance web site:

$filesize = 2000;
$handle = fopen($url, "r");
$raw_quote_data = fread($handle, $filesize);
fclose($handle);

The data will be in the format:

"BSE-100",4.37,0.47
"ATX",23.23,-1.68

and so the next stage is to load the data into an array (using the new line as a delimiter):

$quote_array = explode("\n", $raw_quote_data);

finally the results can be output (taking care to remove the additional quotation marks):

echo "";
echo "";
$quote = explode(",", $quote_value);
$symbol = str_replace("\"", "", $quote[0]);
$value = $quote[1];
$change = $quote[2];
echo "";
echo "";
}
echo "
Name Stock Quote Change";
foreach ($quote_array as $quote_value) {
echo "
$symbol $value $change
";
}
?>

}
?>

Using the PHP Function to Display Yahoo! Finance Data to your

Once the function and library have been saved then they can be used in a PHP web page (for instance index.php) to display the default stock market data:

include ("yahoo_finance.php");
show_stock_quotes (False);
?>

or used in a PHP file that can process the input from a textarea box:

include ("yahoo_finance.php");
$symbol_list = str_replace("\n", ",", $_REQUEST["symbol_list"]);
$symbol_list = str_replace("\r", ",", $symbol_list);
show_stock_quotes (False);
show_stock_quotes ($symbol_list);
?>

If this code is stored in a file (for example yahoo_finance_lookup.php) then it can be called from a form: