|Summary:||Package rating comment|
Alekos Psimikakis rated this package as follows:
Alekos Psimikakis - 2017-10-19 23:39:23
Very good. Excellent programming. Very neat and correctly indented code.
Suggestion (important): The class should provide for setting a base URL (something like a <base href>). Most webpages use relative paths for images, links etc. So all these seem not to be accessible and downladable by the class, and logically so. I checked the class but didn't find such an option. So, I believe this is why maybe that the URL "https://www.phpclasses.org/browse/top/top.html" -- a rare case where all likns and image sources are set as absolute URIs! -- has been chosen as an example!
That is why I couldn't use a max rating for the class.
zinsou A.A.E.Mo´se - 2017-10-20 02:26:18 - In reply to message 1 from Alekos Psimikakis
Thanks for your rating and your suggestion.I understand your suggestion about something like a <base href> and maybe i will add it soon but actually instead of providing something like a <base href> the class directly try to extends the relative path to full path when you use the method getImages() with this line of code:
This code try to replace the relative path by an absolute or full if you prefer path...I think a base href could be useless in the case where all images in one webpage are not from the same domain.I try my code with another website with only relative path and it works fine...What a pity that you don't give me max rating for the package but i'm nevertheless happy about your rating and your comment.
Alekos Psimikakis - 2017-10-20 09:24:43 - In reply to message 2 from zinsou A.A.E.Mo´se
<base href> is for the current webpage only. If images from other domains are used in that webpage, then they are in absolute form, by necessity.
You don't have to *actually* use a <base href>. You only need to add it to the relative addresses when downloading/referencing images, etc.
Unforunately, I am not good with RegExp, so I can't make the changes you suggest.
Finally, about my rating, look, the "relative" issue is a big miss. You fix it, and I will rate it again with max rating! :)
zinsou A.A.E.Mo´se - 2017-10-20 11:47:31 - In reply to message 3 from Alekos Psimikakis
i don't say to fix it i just say the code already contains the method public function getImages() that allows to get all path to absolute instead of relative...