I'm doing some server socket proging in php, great fun if you've not used it!
Trouble is, the inbound data is over several lines so I've got php looping through each new line as it arrives. The signal that it's looking for is a . on it's own
Problem I've got is that I'm not sure if I should be looking for a . or a .\n or .\r or .\n\r so far the only thing I've matched is a . on it's own which isn't much use.
$data = socket_read($sock, 512);
if (ereg( ".", $data)){break;}else{continue;}
Above works well for any line with a . in it but it needs to be a . on it's own. Any pointers?