title: Yii2 ajax xmlhttp.open
body: <p>How i can use this function in my Yii2 aplication?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          function ajaxrunning()
          {
              if (window.XMLHttpRequest)
              {
                  xmlhttp=new XMLHttpRequest();
              }
              else
              {
                  xmlhttp =new ActiveXObject("Microsoft.XMLHTTP");
              }
  
              xmlhttp.open("GET","autoload.php");
              xmlhttp.send();
              setTimeout("ajaxrunning()", 5000); 
          }
  &lt;/script&gt;
  </code></pre>
  
  <p><br/>
  And i want to change the <b>autoload.php</b> to be the controller function <a href="http://localhost/ta/backend/web/index.php?r=sms/auto" rel="nofollow">http://localhost/ta/backend/web/index.php?r=sms/auto</a>
  <br/></p>