Android push message (MQTT) sent by PHP

Source: Internet
Author: User
Tags php server
1. Server Installation: ibm rsmb (MQTT protocol proxy) ReallySmallMessageBroke (rsmb_1.2.0) download. csdn. netdetailwuzehai024735055 install TostartthebrokeronWindows: kernel.

1. server Installation: ibm rsmb (MQTT protocol proxy) Really Small Message Broke (rsmb_1.2.0) http://download.csdn.net/detail/wuzehai02/4735055 installation To start the broker on Windows: In the folder where you installed the broker, double-click broker.exe.

1. Server Installation: ibm rsmb (MQTT protocol proxy)

Really Small Message Broke (rsmb_1.2.0)
Http://download.csdn.net/detail/wuzehai02/4735055

Install

To start the broker on Windows:

  1. In the folder where you installed the broker, double-click broker.exe.

To start the broker on Linux:

  1. In a terminal, change to the directory where you installed the broker; for example:
    cd /home/laura/broker
  2. Enter the appropriate command for your platform. For example, on Ubuntu, type:
    ./broker.ubuntu

    Alternatively, to run the broker in the background so that it will continue to run when you log out of the session, enter the following command:

    nohup ./broker.ubuntu >> /dev/null &

The broker is now ready to publish messages.

To stop the broker cleanly, type Ctrl-C. On Linux, if you prefer, you can just kill the process of the running broker:

ps -ef | grep brokerkill -term process_id_of_the_running_broker



2 server message sender:
The PHP server uses the PHP library written by SAM for MQTT (the download link is Tokudu PHPMQTT communication project ), send_mqtt.php is a PHP script that receives messages through POST and sends messages to RSMB through SAM.

Http://download.csdn.net/detail/wuzehai02/4735078



3. Message push demo of the ANDROID Client


Http://download.csdn.net/detail/wuzehai02/4735172




Tested by myself, the code is absolutely available

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.