Hello guys,
Example url:
http://p.static.com/i/logo.jpg
I want to be able to extract the urls from my own CDN that are referenced in a string, extract the src url and from the src file and folders, so /i/logo.jpg
, and then replace this with a hashed version, so any hashing function I may use like encode('/i/logo.jpg')
. I'd like an array of all of the matched urls to be returned and then I can process and str_replace
inside the string.
A bit complicated, I hope that makes sense.
Thanks