Sending Image via socket php -
i developing video chat app in php via sockets using linux server client connecting through telnet telnet 127.0.0.1 4444
and code send text message other clients below
$msg['pid'] = posix_getpid(); $message = serialize( $msg ); $f = fopen(self::pipename, 'w+'); if( !$f ) { echo "error: can't open pipe writting\n"; return; } fwrite($f, $this->strleninbytes($message) . $message ); fclose($f)
please tell me how can send images ?
from wikipedia:
telnet network protocol used on internet or local area networks provide bidirectional interactive text-oriented communication facility...
i don't think there way send images until encode them in way (e.g. base64) , decode them on client side.
Comments
Post a Comment