Yahoo! (YHOO) turned in a mixed earnings report Tuesday -- earnings per share rose from a year earlier but revenue was down.

Yahoo! said it earned 18 cents a share in the second quarter compared with 15 cents a share during the same period a year ago. Revenue came in at $1.07 billion, down from $1.12 billion a year ago. On a non-GAAP basis, earnings per shares came in at 19 cents.

The Internet services companys shares fell in after-hours trading after rising 17 cents, or 1.2%, to $14.59 during the regular session.

Wall Street had forecast earnings per share of 18 cents, but revenue had been projected higher than actual figures at $1.11 billion.

The company blamed shrinking advertising revenue and a revenue sharing deal with Microsoft (MSFT) for the decline.

Yahoo! remains a popular Web site but competition from social networking site Facebook and search engine giant Google (GOOG) has left the company scrambling for ways to maintain growth.

For the quarter, earnings per share was up by 18% year over year. We made clear progress in search, and saw strong growth in engagement on our media properties,"  CEO Carol Bartz said in a statement. We experienced softness in display revenue in the second half of the quarter due to comprehensive changes we have made in our sales organization to position ourselves for more rapid display growth in the future.

The company offered a third-quarter revenue projection in a range of $1.05 billion to $1.1 billion, lower than the $1.12 billion forecasted by analysts.

Follow Dunstan Prial on Twitter @DunstanPrial