title: multi threading php app
body: <p>I am a newbie <code>php</code> programmer. I m working on a mass <code>cms</code> detector app. app is working good, bt i want to make it faster. heres my app code : </p>
  
  <pre><code>&lt;form method='post' &gt;&lt;center&gt;
      &lt;textarea cols='50' rows='10' name='sites' style="border: 1px dotted #FF0000﻿; " size="32" &gt;
  http://www.google.com/
  http://wordpress.org/
  http://joomla.org/
      &lt;/textarea&gt;&lt;br&gt;&lt;br&gt;
      &lt;input type='submit' name='tepi' value='Check Sites' &gt;&lt;br&gt;
  
  &lt;?php
  
      if($_POST['tepi']){
      $lol = explode("\r\n",$_POST['sites']);
  
      foreach ($lol as $lolz){
  
      $lolz = trim($lolz);
  
      $joomla = @file_get_contents("$lolz/components/com_content/metadata.xml");
  
      if($joomla){
       echo "&lt;font color='red' fance='Tahoma' size='4'&gt;&lt;a href='$lolz'&gt;&lt;font color='red' fance='Tahoma' size='4'&gt;$lolz&lt;/font&gt;&lt;/a&gt; --&gt; is Joomla ! &lt;/font&gt;&lt;br&gt;";
      }
  
      $word = @file_get_contents("$lolz/wp-includes/js/quicktags.js");
      if($word){
       echo "&lt;font color='blue' fance='Tahoma' size='4'&gt;&lt;a href='$lolz'&gt;&lt;font color='blue' fance='Tahoma' size='4'&gt;$lolz&lt;/font&gt;&lt;/a&gt; --&gt; is Wordpress ! &lt;/font&gt;&lt;br&gt;";
      }
  
      $vb = @file_get_contents("$lolz/clientscript/vbulletin_ajax_imagereg.js");
      if($vb){
  
       echo "&lt;font color='black' fance='Tahoma' size='4'&gt;&lt;a href='$lolz'&gt;&lt;font color='black' fance='Tahoma' size='4'&gt;$lolz&lt;/font&gt;&lt;/a&gt; --&gt; is vbulletin  ! &lt;/font&gt;&lt;br&gt;";
      }
      }
      }
  ?&gt;
  </code></pre>
  
  <p>so this script is scanning 1 by 1. I want something else. i want to post a multiple thread at a time. there will be a option set thread so that i can scan 10-15 site at a time. how can i do that ?</p>