Import IMG and variable through URL

There are a couple of options on how to implement this but I’m not sure on how to do this. The goal is to move through an image sequence which people uploaded to the web.

I could access directly through the URL and make a blueprint in unreal that runs through the url’s but then I also need to import a variable which counts how many images are in the folder. I know how do this with PHP but I’m not sure how to import a variable from php to blueprint. Or I access the mysql database from within blueprint? But I dont know if thats an option.

Anyone know any solution to this?
Or does anyone know if this would be a super complicated or not so complicated task?