How does a chat room based on webscoket make private conversation?

So, I used PHP to do a websocket backend, you can send a message through pusher to the client of the subscription, so as to achieve a simple chat room function, and then want to further realize private chat, but do not know how to achieve better.

The article about the printf series function of PHP is wrong, although it has been tested 100%.

Character-Related: %s-the value in the corresponding variable double quotation mark is inserted into the original string corresponding to the '%s ' symbol position as is. %c-Reference ' Baidu encyclopedia--standard ASCII table ' equals Chr function,

Invalid argument supplied for foreach ()

$data[0] = array( "file"=>"jquery", "file"=>"bootstrap" ); foreach($data as $val){ $link = $val['file'].'.js'; } foreach($link as $val){ $links = ""; } print_r($links); Output:Warning:invalid

What are the specific problems encountered in web development, the knowledge of TCP/IP and HTTP can be used to solve related problems well?

, is currently learning TCP/IP details to ask, the web development of the specific problems encountered in the time, TCP/IP and HTTP knowledge can be used to solve the relevant problems well? Reply content: , is currently learning TCP/IP

Permissions issues for PHP class properties Ctrl + V for the first time with the first spray face after the only alert

Let me not understand the code, which teacher or master can give guidance, thank you very much. The code is as follows: {$pro_name} = $pro_val; } public function __get($pro_name) { if (!isset($this->{$pro_name})) {

pecl-php Extension API version

Recently in writing a PHP extension. There is a slight change in the internal iterator interface functions between the two versions, with the following differences: {php-src}/Zend/zend_interface.c (in 5.3.X): ZEND_API void

PHP millions per hour of Curl request server lost data

The following scenario is described directly in detail: Server A will forward the curl amount of millions per hour by forwarding the data to Server B.curlThe request is a 0-byte file on Server B, as long as the request is recorded in Server B's

How can you enhance the difficulty of brute force of PHP verification code??

How can you enhance the difficulty of brute force of PHP verification code?? Reply content: How can you enhance the difficulty of brute force of PHP verification code?? The simplest way is to give up on your own and access Google's reCAPTCHA

Why am I getting a single thread faster than a multithreaded collection?

I wrote a simple curl collection here, but after execution I found that single-threaded execution was much faster than multithreaded execution. Is it my writing and the question? $images = [ "http://pic.91taojin.com.cn/data/attachment/image/20140

Programmer-Phper Advanced Puzzles

The staff was very friendly and helpful. Back to the point, as a phper for a year, this means that the development time does not include self-study time. But slowly found themselves in a bottleneck can not get out, improve very slow ... You can also

How wide is the 4-bit geohash encoding?

I Baidu a bit, the 5-digit geohash probably can represent 10 square kilometers. So what is the size of the 4-bit geohash that might be? Reply content: I Baidu a bit, the 5-digit geohash probably can represent 10 square kilometers. So what is

Update the problem of modifying data

Title, when the form modifies data, such as Modify user information (user name, avatar, contact, etc.), after modifying the individual fields to commit the changes (and some fields are not modified) that commit all the field update will certainly

JavaScript-seven KN JS upload hint Specifies that the space does not exist. (631:no such bucket)

I use the seven-ox JS SDK to change the uploader inside the domain for my own new space after the namespace or prompt: The specified space does not exist. (631:no such bucket) What's the reason? I use the background php SDK, the background of the

Why can't the closure function be called here? Also the Magic method has not been called

My code is like this: $value) $this->{$key}= $value; The Public Function __call ($methodName, $params) {$params =array_merge (' stdobject ' = $this), $params); if (Isset ($this->{$methodName}) &&is_callable ($methodName)) {//$params is

Just getting started with PHP, ask an operator in the $a++,++ $a, $a--,--$a, the problem

$a=21;$b=$a++; $c=++$a; echo $a; echo $b; echo $c; I understand the results were 23, 22, 23, But why is the result of the input 23,21,23 solved? Reply content: $a=21;$b=$a++; $c=++$a; echo $a; echo $b; echo $c;

Customer service side How to return binary or binary data to the server

1. Android as Client 2, PHP as a service-side Now 1 to return binary or decimal data to 2 How should the data format be returned more reasonable? Reply content: 1. Android as Client2, PHP as a service-sideNow 1 to return binary or decimal data

java-php first time connecting Oracle very slow how to solve

Oracle 11g is used in the database PHP is very slow to connect to Oracle PHP is very slow to connect to Oracle, which can take up to 20-40 seconds to connect to Oracle if it is not connected to Oracle for a long time. But then the connection will

Seven Qiniu Storage-how does the CLI and normal mode PHP communicate?

For help, CLI mode runs the socket server and keeps the connection to the client, When another normal mode PHP process receives the request, it needs to notify the CLI mode of the process: "There is a new message, please send me to the socket client.

How does API interface to the app guarantee the legitimacy of the user?

I search on Google for some of the user authentication program for the app, but also compared to the traditional PC era of cookie authentication, I think it is not reasonable, I think of a solution, do not know whether it is reasonable? This is

How to prevent Jd-gui, jd-eclipse view their own code?

In their own Android learning process found a kind of Jd-gui anti-compilation tool. There is that developer Daniel has to prevent Jd-gui view own code Method! Reply content: In their own Android learning process found a kind of Jd-gui

Total Pages: 5208 1 .... 920 921 922 923 924 .... 5208 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.