|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-16 14:10 UTC] derick@php.net
[2000-08-17 04:42 UTC] kh dot wild at wicom dot at
[2001-01-30 05:00 UTC] sniper@php.net
[2001-07-21 21:54 UTC] andy@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 03:00:01 2025 UTC |
$fd = fsockopen( $server, $port, &$errno, &$errstr ); if( ! $fd ) { print( "Couldn't connect to $server, errno: $errno, errstr: $errstr<br>\n" ); exit; } set_socket_blocking( $fd, false ); $ret = ''; while( ! feof( $fd ) ) { $ret .= fgets( $fd, 128 ); } if( trim( $ret ) <> '' ) { $key = strip_crlf( $ret ); } else { print( "Couldn't get key<br>\n" ); exit; } print( "got key: ---$key---<br>\n" ); $hash = md5( "$passwd.$key" ); $tmp = "$serviceid:$username:$hash"; fputs( $fd, "$tmp\n", strlen( $tmp ) + 1 ); fflush( $fd ); $ret = ''; while( ! feof( $fd ) ) { $r = fgets( $fd, 128 ); print( "-" . $r . "-" ); $ret .= $r; } print( "received id: $ret<br>\n" ); fclose( $fd );