I am copying from web and paste html data using editable text area. copy content is any html copy from web can contain img or any text. I want my editable text area to be able to save copy image link.
how to make every img in my editable text area form string to be saved(copy) to my server and change every img src to my new location in my server.?
example copy data :
<h3>Hello</h3>
<img src="http://web.com/img.jpg"><p>Iam want copying image</p>
<p>all image in this is going to be copy</p><img src="http://web.com/img2.jpg">
I want the image in the copy above to saved to my server and renamed, I know how to save it with use file_get_content and file_put_cotent.
so I saved the image have new location
example result string with new location
<h3>Hello</h3>
<img src="http://myserver.com/img.jpg"><p>Iam want copying image</p>
<p>all image in this is going to be copy</p><img src="http://myserver.com/img2.jpg">
and when i put upload the image. thanks