In this post, we need to make a small modification to previous PHP script for targeted email extraction.
First, we need to revisit the source file of the targeted web page, we can see that there are repeated blocks of agent contacts, with name, email and phone number. Total of 10 blocks per page.
The plan is to use the script to "cut out" each block and stores into array, then extract name, email and phone number from each block.
As you can see, each block starts with <div class="negotiators-wrapper"> tag and ends with </div></div>. Note that both </div> tags are separated by carriage return and new line feed in this example.