#!/usr/bin/php No rights reserved. Go crazy. */ $url = 'http://www.google.com/'; $qstring = urlencode(implode(' ',array_slice($argv,1))); if (($qstring)!='') { $url .= 'search?q='.$qstring; if (basename($argv[0])=='lucky') { $url .= '\&btnI=1'; } else { $url .= '\&btnG=1'; } } exec("open '".escapeshellarg($url)."'"); ?>