drath Posted July 20, 2008 Share Posted July 20, 2008 Google Imagizer http://googleimagizer.info/ Everything seems to be working, put I am guessing there might be ways you can break the search results with code or something. The method of detecting broken images also seems a little slow sometimes, and sometimes it won't detect a broken image at all (don't know why). I don't think the PHP code itself is slow, just the specific image hosts. That code is as follows: if(!file($link)) { $broken++; echo "<div class=\"imgblock\">Image appears to be broken at <a href=\"$imageurl\">$imageurl</a></div>"; } else { echo "<div class=\"imgblock\"><img src=\"$imageurl\" alt=\"$searchquery\" /><br/><a href=\"$imageurl\">$imageurl</a></div>"; } Other than that, I don't see any problems with the system. I'm basically just looking for people to test, and give me criticism. Link to comment https://forums.phpfreaks.com/topic/115719-image-scraper-site/ Share on other sites More sharing options...
darkfreaks Posted July 23, 2008 Share Posted July 23, 2008 Vulnerability description This script is possibly vulnerable to Cross Site Scripting (XSS) attacks. Cross site scripting (also referred to as XSS) is a vulnerability that allows an attacker to send malicious code (usually in the form of Javascript) to another user. Because a browser cannot know if the script should be trusted or not, it will execute the script in the user context allowing the attacker to access any cookies or session tokens retained by the browser. How to fix this vulnerability Your script should filter metacharacters from user input. trim() and strip_tags() ' files affected: /index.php Link to comment https://forums.phpfreaks.com/topic/115719-image-scraper-site/#findComment-597053 Share on other sites More sharing options...
corbin Posted July 23, 2008 Share Posted July 23, 2008 file() reads in the entire contents of a file. Why not just check if it exists some how? Link to comment https://forums.phpfreaks.com/topic/115719-image-scraper-site/#findComment-597132 Share on other sites More sharing options...
Recommended Posts