0

i want to match a title from imdb sites. i test online the pattern regex http://regex101.com. its match and return the title but in PHP no result, no error. what's wrong by the way?

<?php
    $imdb = file_get_contents('http://www.imdb.com/title/tt4600952/?ref_=nv_sr_1');

    $sourcecode = htmlentities($imdb);

    preg_match('/<h1 itemprop="name" class="">([a-zA-Z0-9\:\'\ ]+)/', $sourcecode, $title);

    var_dump($title);
?>
daivd rush
  • 87
  • 6

0 Answers0