News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adam Trachtenberg's Blog:
Stupid PHP one liners Google calc
August 24, 2006 @ 07:22:10

One-liners can sometimes be quite helpful in your programming, and in hopes it will help someone out there out, Adam Trachtenberg shares one of his own in his latest blog entry today.

A long time ago, I wrote a two line hack that let you use Google as a command line calculator. It eventually ended up in the 2nd and 3rd editions of Google Hacks.

The code calls the Google Calculator page and pulls back in the contents, allowing you to pass in any sort of calulation you might want and pass back out the result all cleaned up and parsed out.

0 comments voice your opinion now!
oneline google calculator commandline file_get_contents regular expression oneline google calculator commandline file_get_contents regular expression


blog comments powered by Disqus

Similar Posts

PHPClasses.org Blog: Sending e-mail using [Remote] SMTP servers/MIME Email

PHP.net: Mastering Regular Expressions - now with PHP coverage

PHPBuilder.com: How Regular Are Your Expressions (The ABC's of PHP, Part 9)

Gareth Heyes' Blog: Regular expression challenge

Adam Trachtenberg's Blog: Stupid PHP one liners: Google calc


Community Events





Don't see your event here?
Let us know!


application introduction series code library podcast language threedevsandamaybe bugfix list developer configure laravel release api wordpress interview community project framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework