Quote Originally Posted by malir View Post
YaHoo
In the internet I can't find an example of PHP application in lightstreamer hence I write it. Just save as in the file and type "php filename.php".

PHP Code:
<?
$server    = '127.0.0.1';
$syncPort  = 7001;
$asyncPort = 7002;

$control = fsockopen($server, $syncPort, $errno, $errstr, 5) or die($errno." : ".$errstr."\n");
$feed    = fsockopen($server, $asyncPort, $errno, $errstr, 5) or die($errno." : ".$errstr."\n");

$greeting = fscanf($control, "%s\n");
$sid      = explode('|', $greeting[0]);
$sid      = $sid[0];

fwrite($control, $sid."|SUB|V\n");
$cnt = 0;
while (true) {
    $qry = "0|UD3|S|greetings|S|".$sid."|B|0|S|message|S|Do you count the following?|S|timestamp|S|Count: ".$cnt."\n";
    fwrite($feed, $qry);
    $cnt++;
    sleep(2);
}

fclose($feed);
fclose($control);
?>


I used this code and i'm getting following error, Please help me what is my mistake and how to use this
Notice: fwrite(): send of 88 bytes failed with errno=10053 An established connection was aborted by the software in your host machine. in C:\wamp\www\lightsample\index.php on line 17

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\lightsample\index.php on line 20