title: Jquery Live Notification
body: <p>i have a big problem with my project. </p>
  
  <pre><code>$curl = curl_init();
  curl_setopt_array($curl, array(
  CURLOPT_URL =&gt; "https://api.deutschebahn.com/fasta/v2/facilities? 
  type=ELEVATOR&amp;stationnumber=1401",
  CURLOPT_RETURNTRANSFER =&gt; true,
  CURLOPT_ENCODING =&gt; "",
  CURLOPT_MAXREDIRS =&gt; 10,
  CURLOPT_TIMEOUT =&gt; 30,
  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =&gt; "GET",
  CURLOPT_HTTPHEADER =&gt; array(
  "authorization: Bearer XXX",
  "cache-control: no-cache"
  ),
  ));
  $response = curl_exec($curl);
  $err = curl_error($curl);
  
  curl_close($curl);
  
  $result = json_decode($response, true);
  
  $lift_status[4] = $result['5']['state'];
  $lift_status[5] = $result['5']['state'];
  $lift_status[6] = $result['6']['state'];
  $lift_status[7] = $result['6']['state'];
  $lift_status[9] = $result['7']['state'];
  $lift_status[10] = $result['7']['state'];
  $lift_status[11] = $result['2']['state'];
  $lift_status[12] = $result['2']['state'];
  $lift_status[13] = $result['3']['state'];
  $lift_status[14] = $result['3']['state'];
  $lift_status[15] = $result['4']['state'];
  $lift_status[16] = $result['4']['state'];
  $lift_status[17] = $result['0']['state'];
  $lift_status[18] = $result['0']['state'];
  $lift_status[19] = $result['1']['state'];
  $lift_status[20] = $result['1']['state'];
  </code></pre>
  
  <p>These are lifts, and the $lift_status[4] is the track from a station. The Result will be ACTIVE or INACTIVE.</p>
  
  <p>I have a second Page with a list of some tracks. </p>
  
  <p>For example (state = ACTIVE)</p>
  
  <pre><code>&lt;span class="badge badge-lg badge-primary"&gt;Track 4&lt;/span&gt;
  &lt;span class="badge badge-lg badge-primary"&gt;Track 11&lt;/span&gt;
  &lt;span class="badge badge-lg badge-primary"&gt;Track 7&lt;/span&gt;
  &lt;span class="badge badge-lg badge-primary"&gt;Track 20&lt;/span&gt;
  </code></pre>
  
  <p>And now (state = INACTIVE</p>
  
  <pre><code>&lt;span class="badge badge-lg badge-danger"&gt;Track 4 &lt;i class="fa fa-exclamation-triangle"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;span class="badge badge-lg badge-danger"&gt;Track 11 &lt;i class="fa fa-exclamation-triangle&lt;/span&gt;
  &lt;span class="badge badge-lg badge-danger"&gt;Track 7 &lt;i class="fa fa-exclamation-triangle&lt;/span&gt;
  &lt;span class="badge badge-lg badge-danger"&gt;Track 20 &lt;i class="fa fa-exclamation-triangle&lt;/span&gt;
  </code></pre>
  
  <p>Has anyone an idea how i can solve my problem?</p>
  
  <p>Thanks in advance
  Dennis</p>