title: Joomla auto login from foreign script
body: <p>I am trying to make a script which will login on a Joomla! site and after a simple page refresh will return the value i need.</p>
  
  <p>I thought of something simple like:</p>
  
  <pre><code>wget --useragent="" --load-cookies="" --save-cookies="" --keep-session-cookies --post-data="?option=com_user&amp;username=testuser&amp;passwd=testpassword&amp;Submit=Login&amp;option=com_user&amp;task=login&amp;return=token=1" --quiet -O file http://site/index.php
  </code></pre>
  
  <p>But it returns </p>
  
  <p><code>"You should enable JavaScript to login or register"</code></p>
  
  <p>So i was wondering if such thing is possible? I've tried to use Perl with Mechanize, but the problem is that there is a JavaScript authorization.</p>