0

The problem: When I send message from php to pubnub:

$msg = array("author"=>"MisterX","text"=>"Who's here?"); 
$pubnub = new Pubnub(PubNubPublishKey,PubNubSubscribeKey,PubNubSecretKey);
$publish_result = $pubnub->publish('chat1',$msg);

Clients (on JS SDK) get this message like:

MisterX: Who\'s here?

But when client send the same messages from JS it's works normal:

MisterX: Who's here?

Is it bug in PubNub PHP SDK? Maybe I need to make additional manipulation with $msg before put in to publish(), but there is no mention in docs.

Max Liashuk
  • 1,043
  • 7
  • 18

1 Answers1

0

Test this

$msg = array("author"=>"MisterX","text"=>"Who's here?"); 
$pubnub = new Pubnub(PubNubPublishKey,PubNubSubscribeKey,PubNubSecretKey);
$publish_result = $pubnub->publish('chat1',$msg);
andalm
  • 81
  • 6