How to add a PHP scripts into WordPress

You could basically create a simple plugin, that will generate a shortcode. The function of this shortcode would be displaying the required images. You can choose between Ajax or maybe using the embedded PHP timer to trigger Ajax to retrieve the images. Then you embed this shortcode in your post or page (wherever you wish your images to be displayed).

Good luck.