learning_brain
New Member
- Messages
- 206
- Reaction score
- 1
- Points
- 0
I don't know if I'm going to get any sense here but here goes...
I have a class that analyses an image (test file here refresh for another image) and censors anything that has too many fleshtones by returning a pixellated version.
I am trying to set up a webpage wrapper that loads the html and replaces every image src with the output from the class.
Currently, I'm loading the page using cURL into a variable $html.
What comes next I can't get my head round. After lots of reading up, there's mentions of DOM documents, Xpaths, str_replace, for each, preg_replace etc.. etc but I can't work out how to apply it to this situation.
The closest topic I can find is here but again, I can't get my head round using the existing image url to call a class and return a replacement image url (or the same one if it passes).
Any explanations in simple English would be much appreciated.
Thank you
Rich
I have a class that analyses an image (test file here refresh for another image) and censors anything that has too many fleshtones by returning a pixellated version.
I am trying to set up a webpage wrapper that loads the html and replaces every image src with the output from the class.
Currently, I'm loading the page using cURL into a variable $html.
What comes next I can't get my head round. After lots of reading up, there's mentions of DOM documents, Xpaths, str_replace, for each, preg_replace etc.. etc but I can't work out how to apply it to this situation.
The closest topic I can find is here but again, I can't get my head round using the existing image url to call a class and return a replacement image url (or the same one if it passes).
Any explanations in simple English would be much appreciated.
Thank you
Rich