Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $movies = json_decode(file_get_contents('movies.json'));
- $movie = floor(rand() % count($movies));
- echo $movies[$movie];
- /* for ($i = 0; $i < 5; $i++) {
- $file = file_get_contents('http://tccl.bibliocommons.com/search?formats=BLURAY&page=' . ($i + 1) . '&q=movies&search_category=keyword&status=CE&t=catalogue&title=Movies&view=small&display_quantity=100');
- preg_match_all('/\<span class=\"title\"\>(.*?)\<\/span\>/is', $file, $matches);
- print_r($matches);
- for ($j = 0; $j < count($matches[0]); $j++) {
- preg_match('/title=\"(.*?)\(Blu-ray Disc\)\"/is', $matches[1][$j], $match);
- $movies[] = $match[1];
- }
- }
- echo json_encode($movies); */
- /*
- 1. Seven Years in Tibet
- 2. Star Trek - The Motion Picture
- 3. The Silence of the Lambs
- 4. Superman Returns
- */
Add Comment
Please, Sign In to add comment