title: use Yourls bulk link shortener api and integrate it in form with javascript and HTML
body: <p>I want to integrate below api with my form, where user can input urls and on submit they should get result on same page just below input.
  And result should be one url per line or in table rows.</p>
  
  <p>These are official Instruction for api use</p>
  
  <blockquote>
    <p>Add in your api request the parameter <strong>action=bulkshortener</strong>
        Send the list of the URLs to be shortened using the parameter <strong>urls[]</strong>.
        The response contains each shortened URL in a single line.</p>
  </blockquote>
  
  <h2>Example</h2>
  
  <p>Request API:</p>
  
  <pre><code>http://example.com/yourls-api.php?signature=ursecretkey&amp;action=bulkshortener&amp;urls[]=http://url1&amp;urls[]=http://url2
  </code></pre>
  
  <p><em>Result:</em> On result page it only shows shorten links in single line separated by single space only. 
  <a href="http://example.com/zy1071" rel="nofollow noreferrer">http://example.com/zy1071</a> <a href="http://example.com/ha52ql" rel="nofollow noreferrer">http://example.com/ha52ql</a></p>