title: Load another page in PHP using a loader while using a simple HTML form
body: <p>I'm quite new to PHP. So I'm here to briefly explain my question.</p>
  
  <p>Recently, I started building my site for an online tool, so it has an <code>input</code> box  like this. (I've not designed it fully yet.) (Page URL: <code>index.php</code>)</p>
  
  <p><a href="https://i.stack.imgur.com/8hjSR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8hjSR.jpg" alt="Input Box"></a></p>
  
  <p>I made it to fetch some datas from a social media site! As you can see, there is written "Enter Page URL". Users must have to put the URL of that page.</p>
  
  <p>I should put the HTML content also! Here's it.</p>
  
  <pre><code>&lt;form method="get" action="download.php"&gt;
  &lt;input type="text" name="url" placeholder="Enter Page URL" required /&gt;
  &lt;input type="submit" name="submit" value="Download" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The URL of the <code>action</code> page is <code>download.php</code>. Due to heavy PHP codes inside the <code>download.php</code>, the page responds very slow! Sometimes even it even takes upto 5 seconds to load. Only I know what is there, sharing everything isn't a good idea at all! Users might be thinking, it's their network issue or a site problem or something like that! Being irritated, they're leaving there.</p>
  
  <p>Instead of loading the another page, I wanna put the <code>download.php</code> page inside the <code>index.php</code> page with a loader.</p>
  
  <p>Content inside the <code>download.php</code> page looks almost like this.</p>
  
  <p><a href="https://i.stack.imgur.com/Rlkiu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rlkiu.jpg" alt="Download Page"></a></p>
  
  <p>What if I put the <code>download</code> page in the <code>index</code> page with a loader like this? (Loader Image URL: <a href="http://webplayer.d8u.in/loading.gif" rel="nofollow noreferrer">http://webplayer.d8u.in/loading.gif</a>)</p>
  
  <p><a href="https://i.stack.imgur.com/raqar.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/raqar.jpg" alt="Example"></a></p>
  
  <p>For example, if I return back from a playing video in YouTube mobile website, a loader appears &amp; then suddenly we start seeing the video list! Including another pages in PHP can be done by <code>include</code> or <code>file_get_contents()</code>, but I dunno how to execute this with a loader (not by refreshing the current page). I guess there're so many answers of this in the internet, but I couldn't find any of them! Asking here was a better idea for me.</p>
  
  <p>So, how can I do this using jQuery &amp; PHP?</p>