Search and return part of text inside text file using php
<p>I'm currently working on text file which contains a bunch of text and tags. All I want to do is to find specific text from that text file. below is example part of text inside of text file</p>

<pre><code>target=\"_blank\"  link=\"\/test\/6712311\" onclick=\"test.GA.track('Post', 'Clicked-  List-Item', 'List-hot'); test.Track.event('post', 'c', '', '', 'd', 6712311, 'l');\" class=\"\"&gt;        &lt;img src=\"http:\/\/testphoto.net\/6712311_460s.jpg\" alt=\"test only\" style=\"max-width:460px;\"\/&gt;    &lt;\/a&gt;&lt;\/div&gt;&lt;div class=\"fatbigdick all-users-expand\"&gt;&lt;\/div&gt;    &lt;\/div&gt;&lt;!--end div.content--&gt;&lt;div class=\"info jump_stop jump_focus \" &gt;    &lt;div class=\"sticky-items  \" id=\"sticky-item-6712311\"&gt;&lt;h1&gt;&lt;a href=\"\/test\/6712311\"  target=\"_blank\"  link=\"\/test\/6712311\" class=\" badge-section-link-target\" onclick=\"test.GA.track('Post', 'Clicked-List-Item', 'List-hot'); test.Track.event('post', 'c', '', '', 'd', 6712311, 'l');  \" data-section=\"post\" data-section-pos=\"22\" data-link=\"title\" data-link-pos=\"0\" &gt;asas&lt;\/a&gt;&lt;\/h1&gt;        &lt;h4 class=\"all-users-expand\"&gt;        &lt;a href=\"http:\/\/test.com\/teodora565\" target=\"_blank\" data-section=\"post\" d
</code></pre>

<p>If you copy and paste it on notepad you will notice that it has</p>

<pre><code>&lt;img src=\"http:\/\/testphoto.net\/6712311_460s.jpg\" alt=\"test only\" style=\"max-width:460px;\"\/&gt;  
</code></pre>

<p>on part of text. I want to get all text inside that tag. start tag is</p>

<pre><code>&lt;img src=\"http:\/\/testphoto.net\/
</code></pre>

<p>and end tag is </p>

<pre><code>style=\"max-width:460px;\"\/&gt; 
</code></pre>

<p>and the output should be (assuming that it has multiple image)</p>

<pre><code>6712311_460s.jpg\" alt=\"test only\"

test2.jpg\" alt=\"test2 only\"

xtest3.jpg\" alt=\"testxonly\"
</code></pre>

<p>It is like a web crawler on text file. Any idea how can I do this? Any comment and suggestions is really appreciated. Thanks in advance guys!</p>
