searching for i wanted to extract a paragraph from my website . their are more then 20 paragraph tags used in the index page. the key diff. is style18 class is used 1 time and style 19 3 time in each tag. i want to search them with the content os class 18 eg. the main content
<p class="margin">
<span class="style18">*the main content*</span>
» <a href="https://example1.html">
somthing</a>
<span class="style19">[somthing]</span>
» <a href="https://example1.html">Town</a>
<span class="style19">[somthing]</span>
» <a href="https://example1.html">somthing</a>
<span class="style19">[somthing]</span> »
<a href="https://www.example.html">somthing</a>
<span class="style19">[somthing]</span>
</p>
<?php
$data = file_get_contents('https://www.example.net/index.php');
preg_match('/<title>([^<]+)<\/title>/i', $data, $matches);
$title = $matches[1];
echo preg_match('/(<p)\s.+
.+(style18).+Single\sTrack(.+)
(.+)
(.+)
(.+)
.+(style19).+
(.+)
(.+)
.+(style19).+
(.+)
(.+)
.+(style19).+
(.+)
(.+)
.+(style19).+
<\/p>/i', $data, $matches);
$img = $matches[1];
echo $title."<br>
";
echo $img;
?>