title: How to get event updates from php using MQTT in android
body: <p>I want my app to send a request to server every minute to see if there is any event happened so that it send a HTTP request to fetch new data. </p>
  
  <p>I have a server running windows with WAMP and PHP.</p>
  
  <p>I have already read <a href="http://dalelane.co.uk/blog/?p=1599#comments" rel="nofollow">Dale's post</a>, and searched and read everywhere, but still I don't understand how it works!!!</p>
  
  <p>I want PHP to check the database for events, then if there is a new event, It sends a message to broker that "foo happened for bar", then the client sends a ping to see if there are any new events, then based on the message from the broker, the client knows what data it should fetch from the server. </p>
  
  <p>I want something exactly like <a href="https://core.telegram.org/api/push-updates" rel="nofollow">Telegram's push updates</a>.</p>
  
  <p>Can you please tell me how to use mqtt very simple? 
  All tutorials I've seen are so much hard to understand and so complicated. </p>
  
  <p>And how to use Mosquitto for that. (I've started the Mosquitto service on hte server, but have no idea where to begin how to use it)</p>
  
  <p>thanks.</p>