Use your username and password to login to this forum, if you don't have one, clicking on register will take you to the registration form on

Randomly get an existing movie id

Post here any issues with the API or feature requests

Randomly get an existing movie id

Postby visualcookie » Thu Nov 10, 2016 11:04 pm


I'm currently trying to randomly get an existing movie id to get it's moviebackground. At the moment I just have an array list with movie ids... but this case is such a waste of time. Current code looks like this:

Code: Select all
// Get random movieID
$movieIDs = [59859,140607,2501,49040,2502,2503,20526,672,12445,674,675,673,313297,177572,105,165,196,297761,268,272,414,142061,75656,291805];
$movieID = $movieIDs[array_rand($movieIDs)];

Is there another approach on how to get this done more efficently?
Posts: 1
Joined: Thu Nov 10, 2016 11:00 pm

Return to API

Who is online

Users browsing this forum: No registered users and 1 guest