I read my own website with file_get_contents
to display specific text. I display the data from interviews and I want to get the interview headline and the time to use on another site (link to the interview).
The relevant code block is in a table.
<td>
Interview 1
<small style="color:gray">
Persons 2
Cameras 2
</small>
</td>
<td>
1018 min
</td>
As you can see, Interview 1
is the headline and the time is 1018
. I tried this on my own but somehow the pattern got a little crazy.
preg_match_all('#<td>\s*(.+?)\s*<small style="color:gray">\s*<\/small>\s*<\/td><td>\s*(.+?)\s*<\/td>#is', $mysite, $match)
I used \s*
for the line breaks and spaces and (.+?)
to match. What's wrong with my search pattern?