Subscribe

RSS Feed (xml)

Creating An RSS Feed With PHP And MySQL

Background

RSS or Really Simple Syndication truly is a simple XML markup used to standardize content distribution and syndication. Why use RSS? Syndicating your content through various feed directories and search engines widen your distribution. Also provide your content consumers with an easy way to keep up with updates and new content.
RSS has an easy to build Structure. Start with an xml tag that has the attributes version and encoding. This is followed by an opening rss tag with a version attribute. The main feed information is stored in the channel block. The basic feed information required is title, link, and description. Optionally an image tag can be added if you want to include a site logo etc. Item nodes contain the feed content. You create an item for each content piece, article, news release, etc. Items need nested title, link, and description nodes that are published.

Configure the Basic information

First setup the channel information. Base information required title, description, link, and URL.
$chan_title = "Higherpass.com";
$chan_desc = "Tutorials, articles, and howtos on a variety of computer related topics including php, perl, html, javascript, linux, and opensolaris.";
$chan_link = "http://www.higherpass.com/";
$image_url = "http://www.higherpass.com/images/hp_logo.gif";
 ?>

To keep the script simple and easy to update we store the title, description, and channel link at the beginning of the script. Also add the link to the image. The image section requires a title, url, and link sub-nodes. Both the title and link values need to match the channel values. This example will put the channel variables into the proper image XML tags.

Setup the Database

Example assumes a very simple naming scheme and should be adjusted accordingly.
$db_user = 'mysql';
$db_pass = 'mysql';
$db_host = 'localhost';
$db_database = 'content';
$db = mysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_database);
 ?>

Store mysql user, password, host, database name in the variables. Use mysql_connect and mysql_select_db connect to the database server and attach to the database.
Next setup and Perform Content Query
$query = "SELECT Content.Name, Content.Link, Content.Desc, Content.Posted FROM Content ORDER BY Content.Posted DESC LIMIT 25";
$result = mysql_query($query) or die(mysql_error());
if (mysql_num_rows($result) < 1) {
    die("No records");
}
 ?>

Query the required information from the content table. If no rows were returned exit.

Build XML

The tutorial builds the XML out of order. This is done to easily insert the items into the larger structure. HEREDOC structures being used since snippets are simple and static in structure.
$items = '';
while ($row = mysql_fetch_assoc($result)) {
    $item_title = $row["Name"];
    $item_link = $row["Link"];
    $item_desc = $row["Desc"];
    $items .= <<
        
            $item_title
            $item_link
            $item_desc
        


ITEM;
}
 ?>

Initialize the items variable as an empty string, and loop through database records creating an item section for each. Each time through the loop the new item is appended to the $item variable. The minimum required fields are title, link, and description for an item.
Now put it all together.
$content = <<


        
                $chan_title
                $chan_link
                $chan_desc
                
                        $chan_title
                        $image_url
                        $chan_link
                
$items
        


CONTENT;
 ?>

Send to Client


header("Content-type: application/rss+xml");
print $content;
 ?>
The Content-type of application/rss+xml should be set by the header command prior to sending any non-header data to the client. Finally print the XML to the client.

Retrieving XML With Curl and SimpleXML

Introduction

PHP 5 introduces SimpleXML and its a perfect name as parsing XML data is truly simple. In this tutorial we'll be using curl to retrieve the XML data from a remote web server. We're going to create a class to connect to the remote web server and pass POST data to the server and based on the POST data the remote server will return valid XML. The class will parse the XML response and return an array containing the data. For the sake of simplicity in this tutorial we're not going into detail on the workings of the remote server generating the XML responses.
The first thing we're going to cover is the simple script used to call the class.
$URL = 'http://www.example.com/XML';
$request = 'getInventory';
$parameters = array("param1" => "value1", "param2" => "value2");

$XMLClass = new getXML;
$response = $XMLClass->pullXML($URL,$request,$parameters);
 ?>
This simple script is all that is needed to use the class. We need to set the URL, request, and attributes being passed for the request. The $XMLClass = new getXML initializes the getXML class discussed later on in the tutorial. The response data of the request is stored in $response. For this example we're going to use the following XML.
       
               
               
       

 ?>

var_dump($response) would be
array(2) { [0]=> array(2) { ["attribA"]=> string(6) "valueA" ["attribB"]=> string(6) "valueB" } [1]=> array(2) { ["attribA"]=> string(6) "valueC" ["attribB"]=> string(6) "valueD" } } 

Retrieving Data

Now here is the meat, building a simple curl class to handle the retrieving of the data. More information on using curl in php.
Class getData {
   public $URL;
   public $XMLRequest;
   public $XMLResponseRaw;
   public $parameters;
   public $XPath;

   function buildCurlParamString() {
       $urlstring = '';

       foreach ($this->parameters as $key => $value) {
           $urlstring .= urlencode($key).'='.urlencode($value).'&';
       }

       if (trim($urlstring) != '') {
           $urlstring = preg_replace("/&$/", "", $urlstring);
           return ($urlstring);
       } else {
           return (-1);
       }
   }

 ?>
In this first part we declared a few variables for use in the class. Our first function buildCurlParamString() takes the class variable parameters, which is an associated array with the key being the variable name and the value being the variable value for the request, and turns them into the query string for our POST request to the remote server. We'll set the parameters array later just know it stores the names and values of the fields to post. We loop through the arrays urlencoding the data. The urlencode function formats our data properly for transmission to the server hosting the XML feed.
Then we trim off our trailing & from the previous loop. If for any reason we aren't returning a valid urlencoded string we return -1 out of buildCurlParamString(). 

Using curl

   function curlRequest() {
       $urlstring=$this->buildCurlParamString();

       if ($urlstring==-1) {
           echo "Couldn't Build Parameter String
"."n";
           return(-1);
       }
               
       $ch=curl_init();
       curl_setopt($ch, CURLOPT_URL, $this->URL.$this->XMLRequest);
       curl_setopt($ch, CURLOPT_TIMEOUT, 180);
       curl_setopt($ch, CURLOPT_HEADER, 0);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt($ch, CURLOPT_POST, 1);
       curl_setopt($ch, CURLOPT_POSTFIELDS, $urlstring);
       $data=curl_exec($ch);
       curl_close($ch);

       return($data);
   }
 ?>
This function handles the actual pulling of the data from the remote server with curl. We start by calling the buildCurlParamString() function and getting our POST data ready. Then we use curl_init() to initialize the curl handler and curl_setopt() to prepare curl. Notice we're using the class variables $this->URL and $this->XMLRequest, those will be set when we initialize our class and retrieve data. The data is pulled and returned to the calling function.
   function getFeed() {
       $rawData=$this->curlRequest();

       if ($rawData!=-1) {
           $this->XMLResponseRaw=$rawData;
       }
   }
 ?>
The last function in the curl class is the function that will get called from outside this class. Notice it stores the data in a class variable, that's because we're going to extend this class with our SimpleXML class. 

Finally SimpleXML

Class getXML extends getData {


   function pullXML($URL, $request, $parameters) {
       $this->URL = $URL;
       $this->XMLRequest = $request;
       $this->parameters = $parameters;
       $this->getFeed();
       $this->simpleXML = simplexml_load_string($this->XMLResponseRaw);
       return ($this->parseXPath($this->simpleXML));
   }
 ?>
This is the function that will be called externally to get the data in your scripts using this code. The function pullXML is where you pass the URL of the site, the request, and the arguments for the request. We return the value of our next function parseXPath. ParseXPath is used to parse any Xpath statements we might want to filter our results with.
   function parseXPath() {
       if ($this->XPath!='') {
           $this->XMLXPath=$this->simpleXML->xpath($this->XPath);
           $a=0;
           if (isset($this->XMLXPath[$a])) {
               $XMLParse = parseSimpleXMLData($this->XMLXPath);
           } else {
               $XMLParse=-1;
           }
           return($XMLParse);
       } else {
           $XMLParse = parseSimpleXMLData($this->simpleXML->DATA);
       }
       if (isset($XMLParse)) {
           return($XMLParse);
       } else {
           return(-1);
       }
   }

   function parseSimpleXMLData($data) {
       $i=0;
       while (isset($data[$i])) {
           foreach($data[$i]->attributes() as $attrib => $value) {
               $XMLParse[$a][$attrib]=$value;
           }
           $i++;
       }

       return($XMLParse);
   }
 ?>
In parseXPath we first check if there is a valid simpleXML resource, if the resource is invalid $this->simpleXML will equal FALSE so we return FALSE on this. Then if an Xpath is set we execute the xpath function of simplexml on our simpleXML handle with the $this->simpleXML->xpath($this->XPath). This lets simplexml handle the work of filtering our dataset. Now we pass the data into parseSimpleXMLData which parses through each row of our dataset with the while loop.
You'll notice that as you work your way through a simpleXML resource the nesting uses the same names as the tags. For lists where each record has the same tag an indexed array is created.
The foreach Loop takes the attributes of the row and stores them in the $XMLParse array. If there aren't any rows in the dataset we set $XMLParse to -1. The array $XMLParse is what is returned from the function. If there isn't a Xpath statement we do the same thing without processing an Xpath statement. 

SimpleXML Wrapup

simplexml_load_string($string) -- loads XML from a string variable
simplexml_load_file($filename) -- loads XML from a file specified
Once the data is loaded node names are stored as pseudo class variables and can be accessed via $simpleXML->child.
$simpleXML->xpath("XPath Statement") -- parses Xpath statements by calling the pseudo class function xpath on the simpleXML element.
$simpleXML->children() -- returns the names of child nodes
$simpleXML->attributes() -- returns the attributes for a node applied to




MySQL Download Tracking

MySQL Download Tracking

One application of this would be to track information about file downloads. Here we're going to track the number of downloads and when the last download occurred. We're going to store the information in a MySQL database. Below is the structure of the table.
CREATE TABLE filestats (
   fileid INT NOT NULL auto_increment,
   filename TEXT,
   downloads INT NOT NULL,
   lastdownload DATETIME,
   primary key (fileid)
);
The fileid is just an auto incrementing number used to keep track of the database. Filename will be the field we search with. Downloads and lastdownload are the fields used for keeping statistics.
Insert the following code after the if (isset($_REQUEST["file"])) { statement. This code will connect to the MySQL database and update the file stats. PHP has a strong built in function library for MySQL.
$db=mysql_connect($mysql_host,$mysql_login,$mysql_passwd) or die(mysql_error());
mysql_select_db($mysql_database);
$query=mysql_query("select * from filestats where filename='".basename($file)."' LIMIT 0,1") or die (mysql_error());
$fileexist=@mysql_num_rows($query));
$now=date("Y-m-d G:i:s");
if ($fileexist>0) {
    $updatequery=mysql_query("update filestats set downloads=downloads+1,
    lastdownload='$now' where filename='".basename($file)."'") or die (mysql_error());
} else {
    $addquery=mysql_query("insert into filestats (filename,downloads,lastdownload)
    values ('".basename($file)."','1','$now')") or die (mysql_error());
}
 ?>
The date function is used to set the current date and time. Here it will be displayed in the YYYY-MM-DD HH:MM:SS which is the format of the MySQL datetime format.
In this segment we connected to the MySQL database and updated the download statistics. First mysql_connect connected to the database passing the connection parameters in the order of host, login, and password. Then we selected which MySQL database we wanted to use with the mysql_select_db statement. Once we have the connection completed we check to see if the table holds a record for the file. The first mysql_query searches the database for a record with the filename of the file being downloaded. Mysql_num_rows determines the number of results returned from the query. Here we preceded the mysql_num_rows with a @ to prevent it from returning errors if the query results were empty.
If there was a result from the query $fileexist will be greater than 0 so we update the database. To do this we use a MySQL update query. If there wasn't a result returned an insert query will be used instead of an update.

File Download Security

Want to prevent people from linking to your downloads? This script will force a page to be loaded before the download starts. HTML header statements are used to trigger the download of the file. PHP is used to push the file to the browser.

Principles

HTML headers must be sent before any output is sent to the browser. PHP uses the header function to pass raw HTML headers. For this example we're going to get the filename from the URL www.yourdomain.com/download.php?file=download.zip.
$dir="/path/to/file/";
if (isset($_REQUEST["file"])) {
    $file=$dir.$_REQUEST["file"];
    header("Content-type: application/force-download");
    header("Content-Transfer-Encoding: Binary");
    header("Content-length: ".filesize($file));
    header("Content-disposition: attachment; filename="".basename($file).""");
    readfile("$file");
} else {
    echo "No file selected";
}
 ?>
We started with setting the directory where the files to be downloaded are located in $dir. Be sure not to use in $dir. Then we checked to make sure a filename was specified in the request. If a file was specified then we set $file to the path to the file and the filename. Now that the prep work is done its time to send the file to the browser.
The first header statement tells the browser to expect a download. The next two header statements tell the browser the format of the data and the size of the file respectively. The last header statement tells the browser the name of the file. Finally the readfile statement sends the file to the browser.
On the next page we'll start showing some examples on how to use this.

Cincinnati to Google: Please come here

There have been no mayoral pronouncements, no renaming of the city, no publicity stunts at all to get Google to launch its test site here for a network that promises Internet delivery at 100 times today's usual speeds.

Still, local officials say the Queen City has as good a chance as any to attract the Internet search giant's attention and investment in an experimental fiber-optic network for up to 500,000 users. Friday's the deadline for showing interest in the venture.

"Some cities are going the goofy route and being silly," Mayor Mark Mallory said Thursday, adding the stakes are far from silly.

"This for me is about promotion of the city and showing what we have to offer and why Cincinnati is such a great place. A potential partnership between Cincinnati and Google could be very, very beneficial."

Friday is the deadline for cities and towns to answer Google's "request for information" and for residents to weigh in via Gmail email accounts. Cincinnati is thought to be the only local municipality applying, but it's among hundreds nationally vying to be the test site.

Early last month, Google officials announced they plan to build a trial fiber-optic Internet network somewhere in the U.S. No firm timetables were given.

The Mountain View, Calif.-based company plans to charge "below-market rates" for the test service, although Google officials have long said they are not trying to compete with existing Internet providers.

Cincinnati Bell, Time Warner Cable and Insight Communications already offer standard broadband Internet access throughout Greater Cincinnati and Northern Kentucky. Google has said that it would use its higher-speed network to develop new applications.

A recent survey by Connect Ohio, a Columbus-based non-profit advocating for the spread of broadband Internet access, says that the average download speed among consumers in Southwest Ohio is 2 megabits per second - fast enough to download a three-minute song in less than a minute.

Google's search for a test site has set off a storm of publicity-seeking stunts from towns and cities ranging from Topeka, Kansas, where the mayor temporarily renamed the city "Google, Kansas," to Greensboro, N.C., which is spending $50,000 to market itself directly to Google and provide a huge gift basket to the company.

The mayor of Duluth, Minn., joked about naming male babies "Google Fiber." Sarasota, Fla., has renamed itself "Google Island." Gastonia, N.C.'s mayor made a widely viewed YouTube video, likening the situation to going out on a date and mentioning that the city had already nicknamed itself "G-Town."

Cincinnati officials have set up a Facebook fan page for "Googlenati," which now has nearly 2,020 fans, and a Twitter feed with 36 followers. But apart from a few press releases, including a last-minute reminder Thursday for area residents to provide support, city officials have focused on simply filling out the application.

There has been no accounting from Google of how many supporters have commented for Cincinnati or any other city.

Cincinnati's application was still being finalized late Thursday and was not yet available for public review, city officials said. Mallory said the cost to prepare the application was negligible.

"This is a really efficient way, if we are successful, of bringing a lot of positive attention to the city," Mallory said.

One Northern Kentucky resident pledged his support Thursday, if only to bring greater connectivity to the entire region.

"A rising tide floats all boats," said Mark McFadden, a software designer from Erlanger. "It could open up better connectivity with larger cities such as Chicago, Atlanta and even San Francisco.

"And to be honest, I'm kind of glad the city didn't do any silly stunts, because that's not what this is all about."

Source: cincinnati

Dell Moving China Operations To India, Following The Google Bandwagon

In a severe jolt to China, Dell has announced that it will be moving almost $25 billion of operations from China to India, following Google and GoDaddy, who recently quit China this week.

According to reports from Indian newspaper Hindustan Times, the Chairman of Dell, Michael Dell has assured Indian Prime Minister, Manmohan Singh that Dell will be moving its $25 billion operation out of China to India.

Dell reportedly told the India Prime Minister that they were looking for a safer environment with [a] climate conducive to enterprise. However, Dell will not be a new entrant into India as they already have an office there and moving there would just bring more business India’s way.

This is definitely bad for China since this is the third big company to have already walked out or are planning a walk out of an industry which is notorious for its sanctions and censoring.

I would definitely not be surprised if several more companies start to walk out of China after having enough of the monopolistic nature of the government. The coming weeks will be pretty crucial on how things pan out. However, all we can do is keep an eye to see how many companies have the itch to start packing their bags and moving onto more liberal shores.

Source: techie-buzz

Motorola to replace Google with Bing in China

HONG KONG: Motorola Inc, the handset maker that’s rebuilding its mobile-phone business around Google Inc’s Android software, has dropped the US Internet company’s search engine from one of its Android phones in China.

Motorola no longer includes Google’s search engine in its Zhishang device shipped to China Telecom Corp, David Wolf, acting head of public relations for Asia at the Schaumburg, Illinois-based handset maker, said in an e-mail.

Google’s decision to stop censoring its Chinese service may lead some companies to switch to rivals, such as Baidu Inc, operator of China’s biggest Internet search engine. Motorola is adding Baidu as an option on Android phones sold in the country, and this month said Microsoft Corp’s Bing search and maps service will be preloaded onto its China phones.

“If you were partnering with Google in China, your business plans have just fallen apart,” said Bertram Lai, head of research at CIMB-GK Securities in Hong Kong. “You need to scramble and find new partners.”

‘Honeymoon’
None of Motorola’s four Android phones sold in China currently carries Google’s search engine as it’s not available for license in China, Motorola spokeswoman Kathy Van Buskirk said.

“You had a honeymoon between Motorola and Google until Google developed its own Nexus phone,” said Pierre Ferragu, an analyst with Sanford C. Bernstein & Co LLC in London. “The more Motorola can show that Google has to be cooperative to the handset makers, the better.” He has an “outperform” rating on Motorola.

China Unicom (Hong Kong) Ltd yesterday said it doesn’t use Google search on its phones, after billionaire Li Ka-shing’s Tom Online Inc said it stopped using the US firm’s link on its portal. Unicom, China’s second-biggest wireless carrier, only works with companies that abide by Chinese law, President Lu Yimin told reporters in Hong Kong. The Beijing-based operator is not working with Google currently, he said.

Chinese partners for Google’s search operations need to review their business ties because the U.S. company’s service license in China will need to be renewed, said Fang Meiqin, research director at BDA China Ltd, a Beijing-based telecommunications industry consultant.

Top 10 outsourcing destinations

The recent slowdown, which is said to be the worst after Great Depression of 1930s, has boosted outsourcing industry. The need to cut costs has become ever more critical after the slowdown which ravaged several big businesses.

Despite political backlash in several European countries and the US, outsourcing has emerged as a pragmatic business strategy. So, which are the most favourable destinations for outsourcing? The countries that global corporations, boarding the outsourcing bus, think of sending their work to.

Gartner has released a list of 10 top locations for outsourcing. While traditional heavyweights, India and China, continue to lead the list, there are number of countries that are emerging as credible alternatives.

The 10 criteria on which the ranking is based include: language, government support, labour pool, infrastructure, educational system, cost, political and economic environment, cultural compatibility, globalisation and legal maturity, and data and intellectual property security and privacy.

India

Although India continues to grow in terms of IT services being exported, its relative share of the overall worldwide total has declined as a result.

The country is also starting to face some challenges including wage inflation, local attrition rates, geopolitical issues and financial irregularities, which are opening opportunities for other countries that are also improving their capabilities to target local service demands of more-mature regional Asian clients.

China

Giving tough competition to India, China ranks high on parameters like infrastructure and government support. However, it has not been ranked very strongly on language and cultural compatibility parameter.

The country offers a large talent pool of skilled workers who can reportedly handle both basic jobs such as processing insurance claims and mortgage loans, to more technically advanced information technology jobs.

One big selling point for China is its low cost. Compared to India, pricing for this labor is said to be as much as 30% less. According to Chinese government statistics, in 2009, China's outsourcing market grew by 25% to reach $25 billion in revenues.

However, its disadvantages versus India include: One, India's natural advantage with English-language. Two, India is regarded less risky when it comes to IP protection than China.

Australia

As an outsourcing destination, Australia scores high on infrastructure, language, political and economic environment, cultural compatibility, globalisation and legal maturity, data and intellectual property, security and privacy.

However, being a mature markets Australia, offers limited cost savings.

New Zealand


New Zealand too scores high on infrastructure. And just like Australia, country gets high marks for language and cultural compatibility. Other factors that make it a top outsourcing destination are political and economic environment, globalisation and legal maturity, data and intellectual property, security and privacy.

Again, similar to Australia, New Zealand too offers limited cost benefits.

Singapore


Another mature market, Singapore too offers limited cost savings. However, the country offers several other benefits like excellent infrastructure, political and economic stability and cultural compatibility.

Factors like globalisation, legal maturity, intellectual property, security and privacy of data make Singapore an ideal outsourcing destination.

Malaysia


According to the report, Malaysia is mong the countries that have continued to strengthen their position against leading outsourcing alternatives.

During the last year, Malaysia invested considerably to promote outsourcing and leveraged increased demand for lower-cost services.

Indonesia

Indonesia is a new entrant into the top 10 list this year due to its expanding business environment targeting both offshore IT and business services, its large labour pool and its well-established industry base in mining and manufacturing involving prominent multinational companies.

According to the report, this was largely due to Indonesia’s noticeable progress in addressing offshore opportunities rather than just Pakistan's drop in performance. However, political instability remains a key factor for companies seeking outsourcing destinations.

Vietnam and Indonesia are the only two countries which have received not very high ranking on infrastructure parameter. The country also scored low on language and cultural compatibility parameter.

The Philippines

The report ranks the Philippines for the cost savings it offers. However, the country is rated not very high for its political and economic environment.

According to the report, while low cost is an important factor, the political and economic environment remains a concern for many companies when moving business to offshore locations.

Thailand

Another country that gets good marks on costs parameter is Thailand. The country is rated high for offering good cost benefits to companies outsourcing work to Thailand. Thailand also scores high on infrastructure parameter.

However, like the Philippines and Indonesia, Thailand too is rated less favourably for political and economic environment. Thailand was also ranked low on language and cultural compatibility.

Vietnam

Vietnam is the only country to receive an excellent rating on cost parameter. However, it received ratings of fair or poor on every other criterion.

Vietnam was ranked worst on data and intellectual property, security and privacy parameters. The country was also not ranked high on other parameters like infrastructure and language and cultural compatibility.

Salman, Qaidi No 210!

They were perhaps some of the darkest days in Salman Khan’s life, but now they are set to light up the silver screen.

Salman, one of the prime accused in the infamous chinkara case, had to spend time behind bars in 1996 and 1998, and now that period of his life is being recreated in a film called Qaidi No 210. And guess who is helping with the research? Salman’s former cellmate, Mahesh Kumar Saini.

Mahesh and Salman struck up something of a friendship in the three days they spent together in Jodhpur Central jail in 1996. Ranjit Sharma, the producer of Qaidi No 210, was introduced to Saini by the jailor during the course of his research and now he has taken him onboard as a consultant.

“I spent quite some time researching the subject and met many people in Jodhpur Central jail. That’s where I also met Mahesh Kumar Saini, a murder suspect,” said Ranjit Sharma. “I told him to get in touch with me whenever he was released. He got in touch some months ago and he has given me details about Salman’s stay in the jail. Chirag Patil, son of former cricketer Sandeep Patil, will play Salman.”

Mahesh himself is all praise for Salman and convinced about his innocence. “All I can say is that Salman is one of the nicest human beings I have ever met. I know for a fact that he is innocent. I can’t reveal more because he had told me everything in confidence, but Salman never fired that shot (which killed the chinkara).

He is going through hell to save someone else. I don’t think he ever expected this incident to become such a controversial matter and that even political bigwigs would play dirty. But one day justice will be done,” he said.

Recounting the three days he spent with Salman in jail, Mahesh said, “On the first day, he was tense. I was the jail monitor, so I chatted with him and took him for a prison tour.” Several interesting aspects about Salman revealed by Mahesh may finally make their way to the script as well. “Salman is addicted to coffee. He wanted one cup every hour. He hardly ate anything except the chocolates his brother Sohail had given him. He had many visitors. The ones I knew were his sister Alvira and brother Sohail. On the second night, I made soyabean and we ate together.”

Mahesh says Salman even managed to exercise in the jail. “We managed to sneak in dumb bells for him though they are not allowed. On the second day he was feeling bored. I arranged a carrom board for him and even a chess board.”

When Salman was finally released on bail, he offered to give Mahesh Rs 20,000 as a token of his appreciation. “I told him I can’t take the money, but I’d be grateful if he could find me a job when I got out. Salman said he’d do the needful, but I have to reach him.

I hope to meet him someday because I know a person like him will honour his word,” said Mahesh.

source: times of india

Well Done Abba: Movie Review

Right from Mandi to Welcome to Sajjanpur , Shyam Benegal has always used satire and simplicity as the strength of his comedies. For audiences fed (up) with an overdose of slapsticks, this is as refreshing change as having healthy homemade food when consumption of regular roadside junk leads to constipation.

Adapted from a short story Narsaiyyan Ki Bavdi by Urdu writer Jeelani Bano which was also translated into a tele-film in Doordarshan days, the anecdote has since become part of Indian folklore. Well Done Abba also credits Hindi author Sanjeev’s ‘Phulwa Ka Pul’ and a screenplay treatment by Jayant Kriplani ‘Still Waters’ as its source materials.

The story opens with Armaan Ali (Boman Irani), a car driver in Mumbai, returning to work after months of leave. Almost on the verge of losing his job, Armaan seizes the opportunity of explaining his boss the reason for his extended holiday en route a long drive to Pune.

The casual visit to his village gets long-drawn-out when he comes across the water shortage there and decides to get a well dug in his barren fields. As he literally runs around bribing everyone from officer, collector, engineer, village-head to even a photographer, you can visualize him playing Pankaj Kapur’s part from an episode of the popular sitcom Office Office . And like the sitcom, Benegal bestows an upbeat mood to the film over making it look like a depressing drama of distress and difficulty.

And just when you wonder if the film is a neorealist take on Armaan Ali’s well-wish in the vein of classics like The Bicycle Thief or Do Bigha Zameen , the second half goes in complete reverse gear where Armaan Ali gives the perpetrators a taste of their own medicine. The well that never existed is reported as stolen in police files and everyone involved in its ‘well-being’ is questioned. That makes way for a perfect political satire which is clever and caustic and the black comedy that emerges from the series of events is credibly crafted.

The film primarily points out the prevalent bureaucratic corruption that hijacks several schemes initiated by the government for the poor thereby hindering development of the society and hence the country. It also intelligently brings out the irony of how staying below the poverty line has rich outputs.

The multilayered screenplay by Ashok Mishra is adorned with a horde of varied amusing characters. Armaan’s support system is his daughter Muskaan (Minissha Lamba) who makes way for the mandatory love track (with Sameer Dattani) which slackens the pace in start but soon their romance progresses simultaneously with the narrative and is refreshingly restrained. Armaan also has a twin brother and a sister-in-law (Ila Arun) who, though don’t contribute much to the central plot, are interesting characters in their own right. Another ‘potent’ial character is a virile engineer (Ravi Kishan) who forever has his wife (Sonali Kulkarni) on his mind. However the track of an inspector (Rajit Kapoor) and his bickering wife seems half-baked and peripheral to the plot.

Despite being a trail and tribulation journey, Benegal’s direction has a feel-good charm to it. His storytelling is so straightforward that even when the film extends beyond its climax into a celebratory song, you don’t mind much. Ashok Mishra’s hilarious dialogues have a countryside authenticity to it and Benegal ensures that the peculiar traits and accents of each character are well captured.

Source: .indiatimes

Can Warne's boys defuse Chargers?

AHMEDABAD: Rajasthan Royals will look to maintain their winning momentum as they lock horns with Deccan Chargers at the Motera on Friday. After three consecutive defeats, it was here in Motera that Shane Warne & Co put their IPL campaign back on track with a 34-run win over the Kolkata Knight Riders last Saturday.

RR's convincing win over Kings XI Punjab in Mohali on Wednesday, their second on the trot, just reiterated what their skipper and coach Shane Warne has been stating: "We are a good team and all we need to do is to implement our plans on the field. The result will take care of itself."

After a close finish and two embarrassing losses, Warnie's boys have been just good enough to do the basics right and squeeze a win here and there. Their stars are not big names, with Faiz Fazal, Naman Ojha, Abhishek Jhunjhunwala, Siddharth Trivedi, Yusuf Pathan and Paras Dogra to name a few.

Add to it guys like Shaun Tait, Adam Voges and Michael Lumb and Warnie has a group of fighters which may not have deadly reputations - apart from Yusuf Pathan - but can be very effective when it matters.

The Royals have, meanwhile, offloaded Damien Martyn after they trimmed the squad to 19 members.

But it will be a real test for Warnie and Co as they are up against the defending champions and a team which too has gathered momentum after an early loss against KKR on the opening day.

"We had a slow start but we played better in the last few games. We are working hard and trying to take every game as it comes without thinking much about defending the title. Every team is playing good cricket and every team can beat every team. It will be a hard fight to get to the final four.

"The Royals will be confident after their performance in the last two games," said Chargers skipper Adam Gilchrist.

DC are third on the points table, two places above the Royals, and have been bolstered by the entry of the two West Indian, Kemar Roach and Dwayne Smith, into the side. Chargers got the Barbadian quick Roach after a tug of war with

Chennai Supper Kings for a whopping $720,000. Unlike the Royals, the Chargers have always got good support from their foreign hires and Chaminda Vaas, Gibbs, Andrew Symonds have all complimented local lads VVS Laxman, Rohit Sharma, T Suman, Pragyan Ojha and the others well.

Laxman, who was nursing an elbow injury, is now fit and he trained and even batted at the nets in a three-hour long practice session at the Motera on Thursday.

The only concern for Gilchrist may be RP Singh's form. He has played four matches so far, bowled 14 overs, gave away 139 runs at 9.92 and has picked up just three wickets.

"We are working very hard with RP and he is also very keen to give his best. We all are working very hard towards that," added Gilchrist.

He is, however, very pleased with Ojha's bowling. "The left-arm spinner has picked up four wickets so far from 16 overs, giving away 114 runs at 7.12. Ojha is our main bowler. He was our strike bowler in IPL 2 as well and even here he is hungry for success," the skipper added.

Source: Times of India

Tendulkar puts Mumbai Indians on top

Mumbai Indians delivered yet another morale-crushing defeat on Chennai Super Kings in their DLF-IPL III league match at the Brabourne Stadium here on Thursday.

Sachin Tendulkar and Shikhar Dhawan, determined not to be weighed down by the asking rate of nine an over, stayed ahead of the demanding run rate by galloping at 10 runs in the Power Play overs.

Left-hander Dhawan, chosen ahead of Sanath Jayasuriya for the second time in the competition, dominated the thundering start as the excited home crowd roared in approval.

Dhawan fell to left-arm spinner Shadab Jakati, Saurabh Tiwary to Muttiah Muralitharan and Rajagopal Sathish to Joginder Sharma, but Kieron Pollard struck the ball hard and long for a crucial fourth-wicket stand that produced 39. Eventually, skipper Tendulkar's 72 (52b, 8x4, 1x6) won him the Man-of-the-Match award and his team its fourth victory in five games.

Earlier, the Super Kings batsmen were determined to make amends once Tendulkar asked them to take first strike. After Ryan McLaren conceded just five in the first over of the innings, Matthew Hayden flayed Zaheer Khan for four boundaries in the second.

The burly left-hander took the aerial route between cover and third man for the first three fours before punching the ball straight down the ground for the fourth.

A change of bat from the conventional to mongoose at the sight of Harbhajan Singh in the fourth over turned out to be unlucky as Hayden was trapped leg-before. Parthiv Patel departed soon, losing his off-stump.

Suresh Raina announced his arrival with a front-foot swing off Dwayne Bravo to backward square-leg for a six and followed it up with a square-drive for four. Raina picked up the line quickly to club the Mumbai Indians bowlers to all parts of the ground.

He was well supported by S. Badrinath as they raised 142 for the unbroken third wicket. When Raina was struggling to cope with the muggy conditions, Badrinath demonstrated refreshing creativity and boldness as Super Kings finished at 180, the highest target for the home team in its five matches.

However, Tendulkar ensured that his side won by five wickets and went to the top of the IPL table.

The scores:

Chennai Super Kings: Parthiv b McLaren 8 (12b, 1x4), M. Hayden lbw b Harbhajan 20 (12b, 4x4), S. Raina (not out) 83 (52b, 7x4, 3x6), S. Badrinath (not out) 55 (45b, 6x4); Extras (lb-4, w-9, nb-1): 14; Total (for two wkts. in 20 overs): 180.

Fall of wickets: 1-32, 2-38.

Mumbai Indians bowling: McLaren 4-0-23-1, Zaheer 4-0-45-0, Harbhajan 4-0-25-1, Bravo 4-0-42-0, Malinga 4-0-41-0.

Mumbai Indians: S. Dhawan c Raina b Jakati 56 (34b, 5x4, 2x6), S. Tendulkar c Dhoni b Balaji 72 (52b, 8x4, 1x6), S. Tiwary lbw b Muralitharan 2 (3b), R. Sathish b Joginder 5 (9b), K. Pollard b Muralitharan 20 (9b, 3x4, 1x6), D. Bravo (not out) 11 (7b, 1x6), R. McLaren (not out) 1 (1b); Extras (lb-4, nb-1, w-9): 14; Total (for five wkts. in 19 overs): 181.

Fall of wickets: 1-92, 2-96, 3-120, 4-159, 5-172.

Chennai Super Kings bowling: Morkel 4-0-26-0, Balaji 4-0-47-1, Joginder 2-0-23-1, Jakati 4-0-30-1, Muralitharan 4-0-32-2, Perera 1-0-19-0.

Source: The Hindu

Facebook Cozies Up With Cricket and IPL 2010

Facebook has started to show a growing inclination towards India, firstly by opening up an operations office in Hyderabad, and now by cozying up to Cricket and promoting the IPL 2010 extravaganza and cricket in general.


Meenal J. Balar, a manager at Facebook for International growth, recently wrote a blog post on the Facebook blog promoting the sport (cricket) people are crazy about in India and several other parts of the world.

Though Cricket is not as popular as Football (soccer), it definitely has a lot of fan following, and it being promoted on a social network which has more than 400 million users definitely shows where Facebook is heading in the future after it has almost become the number 1 site in US.

Though Meenal did promote several external sites, the main focus was on how users can use Facebook Connect to easily access the site by using their Facebook account.

India is no newcomer to the social networking scene and there are people who use a mix of Facebook, Twitter and Orkut to keep in touch with friends, but using a sport which is almost touted to be a religion in India is a good move by Facebook to connect with people and grow their user base in India and even around the Indian sub-continent.

source: techie-buzz

Tendulkar, Mumbai keep soaring in IPL 3

MUMBAI: A free-flowing, in-form Sachin Tendulkar and new-found opener Shikhar Dhawan lit up another night for the Mumbai Indians as they scored a comfortable five-wicket win over the Chennai Super Kings at the Brabourne Stadium on Thursday.

The master blaster continued his amazing batsmanship, mixing caution and aggression with grace as the others simply rallied around him to enjoy the party.

While first it was the free-flowing and carefree Dhawan who ensured an explosive start, cracking a 34-ball 56 (5x4, 3x6), the tall and thundering West Indian Kieron Pollard chose the occasion to show his worth playing some ballistic hits.

All along though the Mumbaites just couldn't have enough of their beloved Tendulkar, who stood out as a shining example with the stripes on his T-shirt gleaming just as the newly-built sea link in Mumbai.

It was yet another display of sheer timing, placement and power as the Mumbai Indians skipper shaped the victory, scoring 72 runs off 52 balls (8x4, 1x6), his big shot being the six off Muralitharan over long-on in the 13th over just when the shackles had to be broken. He ran brilliant twos too. It was Dhawan, though, who picked the pace in right earnest.

Till he made a mistake, Dhawan was on song and all his hits and super drives were well directed. He slammed L Balaji for two sixes (over mid-wicket and fine leg) in the sixth over and soon reverse swept Jakati for four. He targeted Jakati again sending him to the mid-wicket fence in the ninth over but mistimed a second big hit two balls later only to sky a simple catch to Suresh Raina at short-mid-wicket. Dhawan and Tendulkar added 92 runs for the opening wicket in 8.5 overs.

Earlier, MS Dhoni's trusted lieutenant Suresh Raina batted with elegance and bravado to provide Chennai Super Kings a challenging total after being put in to bat first. Raina also shared a worthy unbeaten association of 142 runs, the biggest partnership of IPL 3, for the third wicket with Badrinath.

The southpaw Raina drove, bisected, scooped and pulled to score unbeaten 83 off 52 balls with seven fours and two sixes.

Source: times of india

Sanath knows what is good for him: Robin Singh

The poor form of Sanath Jayasuriya notwithstanding, Mumbai Indians coach Robin Singh today threw his weight behind the Sri Lankan and said he would soon bounce back and rediscover the lost rythm.

“Sanath is a seasoned cricketer and he knows what is best for him. It is a question of getting him motivated to play his role,” Singh told reporters ahead of encounter against Kolkata Knight Riders here tomorrow.

The Matara marauder has got out cheaply scoring 23, 7 and 2 in his team’s previous three matches.

Terming the shot selection of the batsmen against Royal Challengers Bangalore as bad, Singh hoped that the team will be more careful with the choice of their shots in the next game.

“I think we were just bad. I hope the guys will be more focused and probably be more careful about shot selection,” he said.

Asked whether the team had any plans for Chris Gayle, Singh said, “Not really thought about it, we are just focusing on what we want to do and what team we want to play.”

“(It) hardly matters (how big a hitter Gayle is). There are many big hitters in the tournament,” he added.

Source : Hindustan Times

Injuries cast shadow on Twenty20 World Cup selection

Injuries to key players, including skipper Mahendra Singh Dhoni, would be at the back of the senior national selectors’ mind when they sit on Friday to pick the Indian squad for Twenty20 Cricket World Cup which begins next month in the West Indies.

Dhoni and opener Gautam Gambhir were injured during the early part of the ongoing Indian Premier League while Ashish Nehra, another important member, has not played any match in the IPL for Delhi Daredevils due to a rib cage problem.

In last June’s Twenty20 World Cup in England, India’s defence for the title they won with much fanfare in 2007 in South Africa was affected because of injuries to key players Virender Sehwag and Zaheer Khan.

The selectors would be wary of the injuries to the key players when they meet to prune down the preliminary list of 30 players to half for the April 30-May 16 tournament in the Caribbean.

The biggest worry could be the injury to left-arm pacer Nehra, whose last competitive tie was against South Africa in the second ODI at Gwalior on February 24.

Gambhir, who is recovering from a hamstring injury, and Nehra went to Sri Lanka for ayurvedic treatment there.

Dhoni, who was hit on his forearm by New Zealand pacer Shane Bond when leading Chennai Super Kings against Kolkata Knight Riders on March 16, has, however, rejoined his team members and declared himself fit.

Barring the odd surprise, the five selectors are unlikely to experiment too much with unknown commodities.

One of the players expected to get a look-in following his impressive show in 2008 IPL and current edition of the lucrative Twenty20 league is Karnataka’s Manish Pandey, who has also been in peak form in this year’s Ranji Trophy championship.

Pandey has made the wise move to move up the order and accompany veteran South African all-rounder Jacques Kallis in giving his franchise outfit Royal Challengers Bangalore sound starts in IPL 3.

The inclusion of Pandey will give the Indian team the option to have another explosive player at the top of the order to take advantage of the first six overs of power play which sets the tone of the course of the innings.

Another player, who is under a cloud but not because of injury, is Rajasthan Royals all-rounder Ravindra Jadeja, an integral part of the Indian ODI squad. The IPL had imposed on him a one-year ban for breaching player guidelines.

Source : Times of India

Tendulkar unveils Dungarpur’s portrait at CCI

Batting maestro Sachin Tendulkar today unveiled Raj Singh Dungarpur’s portrait at the Cricket Club of India in Mumbai and recalled his long association with the late cricket administrator.

“It’s an emotional moment for me. I was associated with Rajbhai for a long time and today it gives me immense pleasure to see Rajbhai’s portrait here,” said the champion batsman after unveiling Dungarpur’s portrait at the main hall of the CCI.

Tendulkar also recalled with gratitude all the help he had received as a young boy from Dungarpur in fulfilling his dream of playing for the country.

“I was very close to him from my schooldays and he was among those instrumental for giving me the opportunity to play for the country. You may have talent but it needs the right platform and Rajbhai was instrumental in providing it,” said Tendulkar.

It was under Dungarpur’s stint as the chief selector that Tendulkar was chosen for the first time to play for India as a member of the team that toured Pakistan in 1989.

The batting great also remembered that Dungarpur was instrumental in sending him to England in 1986 (with the Star Cricket Club managed by former Rajasthan pacer Kailash Gattani).

He also rued that when Test cricket returned to the Brabourne Stadium owned by CCI after a long gap, Dungarpur was not alive to see his dream come true.

HOWTO : TWEETS FROM PHP

Many of our readers have been asking how they can access to twitter from PHP code and here we come with a simple tutorial that will give all the basics to do even more complex operations.

Let’s see in this simple tutorial how we can read our timeline and update our status from a simple piece of PHP code.

First of all we suggest you to have a look at the Twitter API wiki where you can have access to many useful information about the API and how to use them in different coding languages.

We will use for this example one of the many available open source libraries written to use twitter from PHP called PHP Twitter written by Tijs Verkoyen, you can download the library 1.0.2 version from here .

We will notice that PHP Twitter class has no real documentation and the only way to have some information is to read the Twitter Wiki API pages and understanding how API works just look into the PHP Twitter code for the corresponding function to call.

The first step to do is to include the PHP Twitter library into our code, so if we place the twitter.php file into the same directory of our project file we will write something like:

Now we need to create a Twitter class object and give it two parameters that are the twitter ID and password to log into twitter API with our identity.

We are at this point authenticated into twitter api system so we can start with our requests, and the first thing we will do is to update our status using the updateStatus() function this way:

The content of the $user_text string should be written into your twitter status now, yes it’s just that simple :)

Another useful PHP Twitter library function is the getFriendsTimeline() that you can use to retrieve the 20 most recent statuses posted by you and your friends, actually this is like looking at the /home twitter page once logged into twitter.

This function returns an Array with all 20 statuses and additional information, we will use the print_r() function to read out the server response:

You can obviously go through the array and have a look for example at who was the last one to tweet and what he said:



02
03 include "twitter.php";
04
05 $twi_user = new Twitter("username","password");
06
07 $aTimeline = $twi_user->getFriendsTimeline();
08
09 echo $aTimeline[0]['user']['screen_name']." was the last to tweet and said : \n".$aTimeline[0]['text']."\n\n";
10

Note that this last example was intended to be used with commandline php, if you want to print the result on a web page just replace each ‘\n’ with a ‘
’.

Well this simple tutorial ends here and we hope to have given you some basic and useful ideas on how you can interact with twitter using some simple PHP code that you can use in your websites in different ways.

IPL will do billion-dollar business this year: Modi

In terms of brand value or valuation there could be bigger sports club in the West but most of those have negative cash flow, Mr. Modi said

Indian Premier League would generate a revenue of USD one billion this season, thanks to huge fan following across the globe, attracting a large number of advertisers, its Commissioner Lalit Modi said on Wednesday.

“The tournament is still on and we have not reached the final number… Yes, it will be more than a billion dollar (about Rs. 4,700 crore) this season … last season we did USD 450 dollar.

“Thereafter, we would double every year,” Mr. Modi said and asserted that as long as the fans keep coming to IPL, the league’s brand value would increase and hence the revenue.

Revenue for Sony, the official broadcaster, alone would be about Rs. 700 crore to Rs. 800 crore, he said brushing aside the criticism that the advertising rates for the IPL’s third season were very high.

“There may be some advertisers who feel that way but there are lot many others who are willing to join us,” he said pointing out that the huge success of the tournament in terms of TV viewership would certainly entice the advertisers.

“There is no other sporting event across the world generating more eyeballs than the IPL,” he said, adding that the league was virtually in every part of the world through either broadcasters of through the Internet — via YouTube.

Asked about an independent brand consultancy valuing Brand IPL at USD 4.13 billion, more than double from last year, Mr. Modi said that it was not done by the organisation and .

“It is indeed valuation given to us by outsiders.”

Brand Finance, which came out with IPL brand’s latest valuation, said that the brand alone has risen significantly, providing tremendous economic value to its owner — BCCI.

It said this demonstrates the exponential value of IPL and the Brand potential in a cricket loving country like India and other global cricketing countries. Although the English Premier League is valued much higher at USD 12 billion, the IPL’s valuation has risen above USD four billion in just three years, Brand Finance pointed out.

In terms of brand value or valuation there could be bigger sports club in the West but most of those have negative cash flow, Mr. Modi said and pointed out that the English Premier League, though it commands a very high brand value, was facing a USD 800 million deficit.

“Here, we are talking about cash flow and it is growing to grow in future at IPL,” he said, while detailing the dynamics of financing of IPL franchises.

Mr. Modi said that the IPL teams had no load on them and “we are providing infrastructure and stadium free of cost.”

Asked about predictions that IPL could not sustain, Mr. Modi retorted: “Let them (cynics) say anything. I know the numbers. I know the game. I have delivered. We will continue to deliver.”

The success of IPL hinged on the capacity to draw huge crowds, a fact that need not be proven again and again, he said, adding that other factors included that teams were equally placed in terms of finances and capacity to buy the players.

“The level playing field between the teams would make the event more interesting,” he said and added that another factor for the success was that the revenue would be proportionate to the number of matches that are played.

This season there are 60 matches and the number would go to 90 by next year and, therefore, the revenue would increase on a pro-rata basis, he said

6 things I hate about the IPL

The facts first: I've not missed a single IPL match this season. I'm a cricket junkie. And I quite like the IPL. However, I've somehow developed a love-hate relationship with Lalit Modi's billion-dollar baby. Here's why...

Aankhon-Dekha (Be)haal

Have you dared to tune into the Hindi commentary? Arun Lal, Atul Wassan, Saba Karim and Co have forced me to use the mute button. To say they are intolerable is putting it very mildly. If you want to speak in Hindi, please go ahead. But don't call a bread-and-butter shot 'nashte ka shot'. I prefer watching the games on YouTube (despite the five-minute delay and my poor wi-fi connection) just to hear the English commentary.

Environmental Tokenism

The IPL has tied up with the UN Environment Programme ostensibly "to become one of the most environmentally-friendly major sports events in the world and bring environmental awareness to millions of sports fans around the world". So, before every match, one of the commentators spells out a simplistic environment protection tip. Three hours later, there's a flurry of hazardous firecrackers to celebrate one team's win over the other. The sky is bright enough for you to be fooled into believing it's New Year's Eve or Diwali. The truth: it's a league match of the environment-conscious IPL. And we're not even getting into facts like how much power could have been saved if the matches weren't played under lights.

Karbonn Footprints

Last time I checked, cricket was about fours, sixes, wickets and catches. Not DLF Maximum, Citi Moment of Success and Karbonn Kamaal Catch and what have you. Marketers can go to any extent to score high on brand recall in their next market research report. But this is pushing it a bit too far. Tweaking the rules of cricket is acceptable, but altering its lexicon is not.

Lalit 'I Am Everywhere' Modi

Yes, he gave birth to the IPL. Thank you very much. But he's like this over-enthusiastic single parent who won't take his eye off his child even for a nanosecond. He's in the stands, he's in the dug-out, he's in the commentary box, he's at the presentation ceremony and then at the after-party. He's also on Twitter. Even if you stop following him, he has enough cronies retweeting his posts. But it's too much to ask for any modi-fication, isn't it?

Dugout Blues

They may have spent precious millions on buying their teams, but the franchise owners have no business sitting in the dugout. It's not a place for cricketers to explain the difference between leg-spin and off-spin to their owners. If you've paid a bomb to hire a coach, let him do his job in peace. And let the players enjoy the guy-talk. You don't see owners chatting with players on the bench or on the sidelines during an EPL game. It's a professional league, not a family picnic. Though I must confess, it's nice to see Preity Zinta giving her boys the high-fives every time there's a, well, Citi Moment of Success.

Aggrieved Party

The cramped international calendar and equally tough IPL schedule leaves players with little time to rest. To make matters worse, the players have to now compulsorily attend after-parties in the company of some dishy women and, of course, ubiquitous team owners. It sure makes for mouthwatering gossip and glossy tabloid photos but it's tough on the players who are anyway under constant media glare. The idea of commentators speaking to players on the ground during the course of a match is equally unreasonable. The trouble is, there's way too much money at stake for anyone to dissent.

I think I've spewed enough venom for the BCCI to hit me for a DLF Maximum. It's time for a Max Mobile Strategic Time-Out.

Cricket's easy money

The mindboggling bids for the Kochi and Pune franchises of the Indian Premier League (IPL) — adding up to over Rs 3,300 crore between them — is indicative of one thing: very big money is getting into the game. And when very big money enters the picture, one can be sure that not all of it will be pearly white. This cautionary note is important, even though there is no doubt that the money will do wonders for this form of the game.
Any thinking person should ask several whys, whos and whats. Why is so much money getting into the game so soon? Who are the people behind it? When Bollywood gets aligned with cricket, what does it mean for the business of cricketainment? When money from the Sheikhdoms starts invading the sport, what does it portend?
It is no secret that both cricket betting and Bollywood have mafia money behind them, as the widely-publicised presence of Dawood Ibrahim in both arenas has made clear. With IPL now providing a confluence of both businesses, one has to worry about the colour of the money coming in.
This is not to say that any of it is funny money. But one has to put one’s antenna up when someone is willing to pay Rs1,500-and-odd crore for a franchise like Kochi — a city known neither for its quality of cricket nor its ability to groom cricketers.

It is also worth considering that among all forms of the game, T20 is
the diciest. The inglorious uncertainties of cricket apply more to T20
than test or one-day cricket. In the inaugural edition of the IPL in
2008, rank outsiders Rajasthan Royals won. In the following year, the
previous year’s bottom-rankers won. This is not to take anything away
from the quality of their wins. But surely T20 is the most unpredictable
form of cricket. One man’s heroics — or lack of it — can change the
result. If I were running a crooked betting syndicate, this is the kind
of game I would offer game-by-game odds on.
The way the bids
happened for the additional two slots at IPL also does not augur well
for the future of its funding. In the initial auction, the two winning
bidders — the Dhoots for Pune and the Adanis for Ahmedabad — bid at the
base price. This congruence suggests two possibilities: either they were
in cahoots or they thought the base price itself was too high to make a
business out of it.
In the next round, not only did the previous
two winners fail, the field was taken over by two other bidders —
Sahara and Rendezvous. What explains this initial reluctance to bid
being followed up by a rare exuberance in round two?
Now look at
the winners. While the Sahara group is a known hand in cricket
sponsorship, Rendezvous emerged as a joker in the pack, chaperoned by
minister of state for external affairs, Shashi Tharoor. Now why should a
government minister, known more for his book-writing skills than
book-building ones, not to speak of the ability to tweet into
controversy, want to suddenly back faceless individuals to buy a cricket
franchise?
Now cricket has been a happy hunting ground for all
varieties of politicians. From Sharad Pawar to Arun Jaitley to (more
recently) Narendra Modi, they are all in it for the possible publicity
spin-offs and the glory of associating with sporting icons. But if you
have the moolah, Rs1,700 crore will buy you as much influence as you
want. So what’s the extra allure in it for everybody?
It is not my
contention that everybody’s in it for dubious purposes. But there is no
guarantee that funny money will not get into the game. In the stock
markets, participatory notes give unknown investors the opportunity to
grow their wealth anonymously and even launder some of it in a tax
regime that is capital gains-friendly. In the real estate business,
politicians and criminals are
making hay by controlling land
supplies, using discretionary state power and buying up land through
benami deals.
As it is currently structured, IPL offers the
perfect setting to align funny money with straight money — not to speak
of reaping the publicity benefits of bringing Bollywood badshahs and
begums together with cricket’s pashas and prima donnas. IPL’s management
will have to exercise extraordinary caution if it wants to keep the
game unsullied as it expands into uncharted waters.
If I were Pranab Mukherjee, I would put my best sleuths and CAs to take a look. Not because there’s anything wrong already, but because something certainly can go wrong in the future. In corruption-ridden India, it is safe to presume that if there is scope for hanky-panky, there is a strong probability of it. IPL’s latest auction gives the game’s arbiters the chance for a strategic timeout to ponder about what kind of money is driving the game now and why.

Stars' IPL performance should worry Indian selectors

BANGALORE: In a day from now, the national selection committee will sit down to name the Indian squad for the World T20. TOI has been bringing you a formbook ahead of each match in the IPL and should we turn that into a formbook for the tournament itself and present it to the selectors, they would be in a spot for sure.

This is so because most of those who have featured as match-winners in the first 10-12 days of the IPL do not figure in the 30-man probables’ list and so cannot be picked. So, let us look at what the selectors will be missing.

If one were to start with the captain, then think no further than Anil Kumble. Not just captaincy, Kumble has the bowling to back him too.

Where Harbhajan Singh has got four wickets from as many matches, Kumble has five from five but when you turn to the economy rate, Kumble's is an impressive 5.09, while Harbhajan has been taken for 7.14.

It is not just Kumble who is running away with the honours, take KKR's forgotten left-arm spinner Murali Kartik, whose four wickets have come at an economy rate of 5.57 whereas the man in the probables list, Pragyan Ojha of Deccan Chargers, has the same four but at 7.12.

Among batsmen, leading the run-scorer's list among non-probables' list is none other than Tendulkar (176 from four games with a strike rate of 155.75 and average of 58.66). Of course, Tendulkar has reiterated that he is not interested in World T20.

Mumbai Indians' Saurabh Tiwary has been a revelation this season. Tiwary (169, 146.95, 42.25) follows Tendulkar closely along with RCB's Robin Uthappa who has 162 runs from five matches with a strike rate of 178.02 and a superb average of 54. Even Irfan Pathan has had a good run with the bat.

Compare their showings with some of the certainties. While Virender Sehwag has blasted away to 186 runs from five games, Yuvraj Singh has a mere 60 runs from four games and Suresh Raina a poor 97 from five.

Why, someone like Manish Pandey has rattled up 140 runs from five games, perennial hope Rohit Sharma pales with 78 from four matches.

Among the pacemen, Praveen Kumar (7 wickets with an economy rate of 6.75) has done reasonably well, Ishant Sharma has taken six at an expensive 8.65 an over while S Sreesanth has taken a real beating, his two wickets (prior to Wednesday's match) literally bought at 10.63 an over.

Pretty lasses come to clash at IPL match

 CHANDIGARH: Despite securing a roaring win over Chennai Super Kings under their belt, odds are heavily stacked against Kings XI Punjab for today's match as far as out of the field action is concerned.

Though ravishing Preity Zinta can make millions heart skip a beat, this time, she will have to try a little harder to beat the combined oomph of Shetty sisters, Shilpa and Shamita.

When it comes to flashing smiles, Preity's dimple has been reliable as ever, but the battery of glamorous sirens does not shy away from going one step ahead with umpteen flying kisses to enthusiastic fans. The charm of Shetty sisters is enough to captivate and sweep fans off their feet.

It will be a total paisa vasool if Shilpa and Shamita root for their team. Though, Mohali is Preity's den, one thing is sure, Shilpa and Shamita, too, are the crowds' favourite.

"We don't know how teams will play but off field, it's going to be a thrilling competition between these stunners," said Nitin, a student of DAV-10, who had come to watch the practice session of Kings XI at Sector-16 cricket stadium on Tuesday.

Whereas the sister-duo had not arrived in the city a day before the crunch match, Preity, sounded the bugle by wearing a flaming red suit.

But all is not lost for the chubby star as she has the boisterousness of Rocky and wisdom of Ranjit - the Kings XI mascots - to trump muchus cockiness. So, till the playing eleven turn up on the ground for real action, let the reel action take charge!

Ness Wadia fined for smoking at public place

Ness Wadia, industrialist and co-owner of Indian Premier League (IPL) team Kings XI Punjab, has been fined by police for smoking at a public place, an official said on Thursday.
A photograph of Wadia, showing him puffing at a hotel, was published in a daily newspaper on Wednesday. "Taking cognizance of the photograph, we have challaned Wadia Rs 200," a police official said.

OOP Pattern - Factory: Simple Factory Pattern

PHP Factory Pattern Step By Step Tutorial - Part 1: In Object Oriented Programming, we always create new object with new operator. And in some cases, we need call same class for different steps. We can create a factory to avoid always call same class. The factory pattern encapsulates the creation of objects.

PHP Email: Protecting Email Address from Spam Collectors

PHP Email Step By Step Tutorial: Today, many spammers use software that scours websites looking for email address on pages. When found, they will send spam to these addresses. Several way may be can used such as add the text "NOSPAM" into email. In this post, we will use JavaScript as tactic. We convert the entire link into ASCII codes, save them in a JavaScript array, and then use JavaScript to turn it back into HTML.

 Create a file named "protected.php" within www/test/email. Enter above code. And test it:
 When you look source, you will get like this:

PHP Email: Sending Mass Email use BCC

Send Mass PHP Email Tutorial: May be you need to send out an email to many people (such as newsletter or birthday invitation). It is not efficient if we use multiple mail() for this job. Each call to mail() generates a separate call to sendmail on UNIX or a separate connection to an SMTP server on Windows.

May we don't want to display all email address at 'to'. We can modify by using dummy email address, like mailing-list@example.com. Then include everyone else as a Bcc onto this message. The mail server will handle this Bcc, parsing it and ensuring that everyone on the list receives a copy.

PHP Email: Using Embedded Images in HTML Email

PHP Email Tutorial: We ever talk how about send email with attachment. Now, in this post, we want to send email where there is images in there as embedded images. Usually, you get this kind of email from newsletter. So, after read this post, you can build your own newsletter.

Before we write line codes, we must understand following anatomy of email that use embedded images:

01<?php
02 // Setting a timezone, mail() uses this.
03 date_default_timezone_set('America/New_York');
04  // recipients
05 $to  = "you@miscellaneous4all.blogspot.com" . ", " ; // note the comma
06 $to .= "we@miscellaneous4all.blogspot.com";
07 
08  // subject
09 $subject = "Test for Embedded Image & Attachement";
10 
11 // Create a boundary string.  It needs to be unique
12 $sep = sha1(date('r', time()));
13 
14 // Add in our content boundary, and mime type specification: 
15 $headers .=
16    "\r\nContent-Type: multipart/mixed;
17     boundary=\"PHP-mixed-{$sep}\"";
18 
19 // Read in our file attachment
20 $attachment = file_get_contents('attachment.zip');
21 $encoded = base64_encode($attachment);
22 $attached = chunk_split($encoded);
23 
24 // additional headers
25 $headers .= "To: You <you@miscellaneous4all.blogspot.com>,
26             We <we@miscellaneous4all.blogspot.com>\r\n";
27 $headers .= "From: Me <me@miscellaneous4all.blogspot.com>\r\n";
28 $headers .= "Cc: he@miscellaneous4all.blogspot.com\r\n";
29 $headers .= "Bcc: she@miscellaneous4all.blogspot.com\r\n";
30 
31 $inline = chunk_split(base64_encode(
32           file_get_contents('mypicture.gif')));
33 
34 // Your message here:
35 $body =<<<EOBODY
36 --PHP-mixed-{$sep}
37 Content-Type: multipart/alternative;
38               boundary="PHP-alt-{$sep}"
39 
40 --PHP-alt-{$sep}
41 Content-Type: text/plain
42 
43 Hai, It's me!
44 
45 
46 --PHP-alt-{$sep}
47 Content-Type: multipart/related; boundary="PHP-related-{$sep}"
48 
49 --PHP-alt-{$sep}
50 Content-Type: text/html
51 
52 <html>
53 <head>
54 <title>Test HTML Mail</title>
55 </head>
56 <body>
57 <font color='red'>Hai, it is me!</font>
58 Here is my picture:
59  <img src="cid:PHP-CID-{$sep}" />
60 </body>
61 </html>
62  
63 --PHP-related-{$sep}
64 Content-Type: image/gif
65 Content-Transfer-Encoding: base64
66 Content-ID: <PHP-CID-{$sep}>
67  
68 {$inline}
69 --PHP-related-{$sep}--
70  
71 --PHP-alt-{$sep}--
72 
73 --PHP-mixed-{$sep}
74 Content-Type: application/zip; name="attachment.zip"
75 Content-Transfer-Encoding: base64
76 Content-Disposition: attachment
77 
78 {$attached}
79 
80 --PHP-mixed-{$sep}--
81 EOBODY;
82  
83 // Finally, send the email
84 mail($to, $subject, $body, $headers);
85 ?>
86</me@miscellaneous4all.blogspot.com>

Related Posts with Thumbnails