PHPBuilder - www.m-w.com



RSS Twitter
Snippets Other

www.m-w.com

by: Seann Alexander
|
December 4, 2000

Version: 0.1

Type: Full Script

Category: Other

License: GNU General Public License

Description: Looks up a supplied word from www.m-w.com Needs lynx installed. works best via console (/exec echo "word" > ~/.dicword; php /file/dic.php) .. needs work



<?php

$word_DICT = "Australia";
//$exec_STR = "lynx -source http://www.m-w.com/cgi-bin/dictionary?va=". $word_DICT;
//$exec_STR = "lynx -source http://www.m-w.com/cgi-bin/dictionary?va=". $word_DICT ." | grep \"<b>1</b> <b>:</b>\"";
$exec_STR = "lynx -source http://www.m-w.com/cgi-bin/dictionary?va=". $word_DICT ." | grep \"". $word_DICT ."\"";

exec($exec_STR,$ret_VAL);
        exec($exec_STR,$ret_VAL);
        $int = count($ret_VAL);
        echo "Meaning of life..\n ";
        while ($i != $int){
                echo trim(strip_tags($ret_VAL[$i]) ."\n");
                $i++;
        }

?>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Seann Alexander

Comment:



Comment:

(Maximum characters: 1200). You have characters left.