No data returned, where is the writing error? Novice

luke
php
$msg = ['a'=>'subscribe','v'=>array('408065','884737')];
$msg = json_encode($msg);
$con->send($msg);

linux:
Workerman[usmarket2.php] start in DEBUG mode
------------------------------------- WORKERMAN --------------------------------------
Workerman version:4.0.19 PHP version:7.3.31
-------------------------------------- WORKERS ---------------------------------------
proto user worker listen processes status
tcp root none none 1 [OK]
--------------------------------------------------------------------------------------
Press Ctrl+C to stop. Start success.
string(85) "{"type": "instruments_meta", "data": {"count": 85893, "etag": "W/\"64755886-1b51\""}}"
string(59) "{"type":"app_code","timestamp":"2023-05-30T13:31:46+05:30"}"
string(55) "{"type":"error","id":"","data":"error parsing request"}"

Note: Why can't screenshots be taken? Difficult to express needs
Tagged:
  • luke
    No data, do you need to subscribe to certain market quotes to query the corresponding stock codes
  • luke
    Is the data compressed? What function should I use to decompress and read it?
  • rakeshr
    It's a raw binary tick packets. The documentation explains more about this.
    PHPkiteconnect client don't have Websocket streaming implementation by default. You can take reference from this PHP ticker implementation package.
Sign In or Register to comment.