I've built a mini-content management system with CKEditor. The user has the ability to paste an image URL from another website. Is there a way to to get all image URLs when the user submits the content, save all these images to the server, and replace another server's URL with URL of my server?
For example, the user wrote something like this:
<img src="somews.com/img1.jpg"/>Lorem Ipsum is simply dummy text of the printing and typesetting industry. ...
During the submit process PHP would save the image from somews.com/img1.jpg
to the server, converts its URL to myserver.com/photos/img1.jpg
and replaces <img src="somews.com/img1.jpg"/>
with .. Is that possible?