Closed LeeThompson closed 1 year ago
I am working on some more features.
Stuff being worked on:
microsoft.com.ico
becomes microsoft.ico
)I am so sorry - you are a very nice guy and I appreciate your work - my inbox is so full of unfinished work that I forgot to include your request :-( will do better in the future - thanks for your patience
No worries!
Overview
By it's design, it appears that the original use case had this run as a web script whereas I am using it as a command line tool so it should be tested for the various environments/use cases.
Changes
grap_favicon
andload
now have an additional parameter,$consolemode
(default is false).load
can also take a fourth parameter, $timeOut (default is 60)grap_favicon
array now has an additional parameter,OVR
for overwriting files. Default isfalse
.Command Line Switches:
--list=http://www.google.com,http://www.microsoft.com
--list=myfile.txt
)--path="D:\My Icons\"
)--curl-timeout=30
)--user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
)Other Features:
Other Items:
set_time_limit
Usage Examples
C:\php\php.exe get-fav.php --list=sites.txt --path=icons --save --debug
C:\php\php.exe get-fav.php --list=http://www.microsoft.com,http://www.google.com --path=icons --save
Notes
I've been testing pretty heavily, I've made some changes but nothing major, adding some more debug entries (mostly for me lol).
There is an issue where sometimes it takes a really long time for a download to fail but I think it's beyond the script and sometimes CURL is not honoring timeouts.