I can send text from my PHP editor into a Wordpad file via file_put_contents. Is it possible to also send an image, either stored locally, or, ideally, from a given URL address, to the same file? At the moment, it just echoes the image address. I can get the URL address of an image from the web, I want to post it into the wordpad file.
For example, the rtf should read:
Jack and Jill went up the hill to fetch a pail of water.
Jack fell down, and broke his crown, and Jill came tumbling after.
Image1.jpg (the actual image, not this file name.)
The Dow Jones posted above average loses today on the back of the Martian invasion.
President Brockman said that he welcomed our new Alien overlords.
Image2.png (the actual image, not this file name.)
If you want to deal with .rtf files download and use https://github.com/phprtflite/PHPRtfLite library (don't forget that you need to install Composer first)