title: how to get name of streams from a big string using php?
body: <p>i got a big string that holds list of streams. i managed to get the stream urls but now i want to get stream names( name1, name2, name 3) so i can use them later to construct the hyperlinks. could any one show me how i can get the stream names?</p>
  
  <pre><code>    preg_match_all("@((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@", $file_contents, $foo); 
      print_r($foo[1]);
  
    for($i = 0; $i &lt; count($foo[1]); $i++){
               echo $foo[1][$i]."&lt;br&gt;" ; 
      }//end of for
  </code></pre>
  
  <p>example of big string that holds list of stream($file_contents):</p>
  
  <pre><code>name1 http://somesite.net/all/name1tv.m3u8
  name2 http://somesite.net/all/name2tv.m3u8
  name3 http://somesite.net/all/name3tv.m3u8
  </code></pre>