Another option, if you want to avoid the iteration solution would be to pull the version 1 api every couple of minutes and store it on the server
Then whenever you want to see if the model is online you just check inside the file to see if she is there, you can use a simple substr_count() to test if the model name is in there.
The pull of the version 1 gets all models on line so you pull it via cron to load into your file, on my server it takes about 1 second to pull.
|