dbsocket open socket on local machine and wait for data, data can be sent with telnet , PHP code, Perl code, C code, you can use the command echosocket for bash use.
data are printed on standard output.
#! /usr/local/php/php -q <? if ($s=fsockopen("localhost",5555)) { fputs($s,$argv[1]); fclose($s); } else { echo("Could'nt open socket\n"); } ?>