sockets in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi ppl,

i have created a java program to serve as my chat server that connects
to an url and using port 8080...

then i created a client for the server in java then it worked....but i
came accross a problem...i want a php client via a website...however i
tried the php sockets and i have so many problems...i used php cli
first to make it easier....then here is the code..:

$fp = fsockopen( "localhost", 8080, $errno, $errstr, 30 ) ;
if( !$fp ) 
{
	echo "$errstr ($errno)<br />\n" ;
} 
else
{
	fwrite( $fp, 'PHP' ) ;
	while( !feof( $fp ) ) 
	{
		set_time_limit( 30 ) ;
		print fgets( $fp, 128 ) ;
	}
	fclose( $fp ) ;
}

it is working connecting and if another client is sending data it can
read it, but the problem is i cannot send anything...or data to the
server....

can anyone help me....





PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux