I use regex101 for test my regex
This is my regex :
<a href="/name/nm0000130/\?ref_=ttfc_fc_cr8">(.*)</a>
And this is code :
<tr>
<td class="name">
<a href="/name/nm0000130/?ref_=ttfc_fc_cr8"> Jamie Lee Curtis
</a>
</td>
<td>...</td>
<td class="credit">
executive producer
</td>
</tr>
This code work fine on regex101, but if i get data by file_get_contents
and use this, my regex in php not work
I sure data load complete
My php code :
$data = file_get_contents('https://www.imdb.com/title/tt'.$tt.'/fullcredits', false, stream_context_create($contextOption));
preg_match_all('~<a href="/name/nm0000130/\?ref_=ttfc_fc_cr8">(.*)</a>~isU', $data, $return);
Other my regex code for this page work fine, but this is not work
My code;
$contextOption = array("ssl" => array( "verify_peer" => false,
"verify_peer_name" => false,
"allow_self_signed" => true));
$data = file_get_contents('https://www.imdb.com/title/tt1502407/fullcredits', false, stream_context_create($contextOption));
preg_match_all('~<a href="/name/nm0000130/.ref_=ttfc_fc_cr8"(.*)</a>~isU', $data, $return);