PHP "Push" performance for "multiple" terminal devices

Source: Internet
Author: User
PHP "Push" function for "multiple" terminal devices
How to implement the push information function of iOS and other devices with PHP code?

There may be many end devices that need to receive push messages and execute a script to push multiple times

Pass by to give some useful advice, thank you
------Solution--------------------
Now that you have seen the relevant articles, why are you still asking here?
Here is only to give you the idea, the specific code to write their own

The principle is simply to establish a connection (socket similar), from the server to send bytes to the device, the device side after receiving how to handle all can--direct display, pop-up windows, notifications, flashing reminders and so on

There are two ways of doing
1. Server as a service side, a variety of devices as a client, establish a long connection, the server based on trigger conditions sent, the practice is a bit like chat room
2. Reverse thinking, all kinds of equipment as a service side (not written wrong, isthe server), log on to the servers and note their listening ip/port (login is not necessarily sent, the purpose is to submit online status), the server based on the trigger conditions in addition to run the client program submit a connection request to all logged-in devices, and the connection is sent successfully
------Solution--------------------
$fp = Stream_socket_client ("Ssl://gateway.sandbox.push.apple.com:2195″, $err, $ERRSTR, 60,

Stream_client_connect, $ctx);
The point is this. The app wants to register with Apple's server to receive notifications, and when it's registered, it sends a message to Apple's server and the Apple server completes the push.
Instead of PHP being pushed directly into the app.
  • Related Article

    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.