gaffling / PHP-Grab-Favicon

🖼 Saves the favicon of the given URL and returns the image path.
http://suchmaschine.biz
MIT License
26 stars 6 forks source link

Cannot Grab #15

Open Rei444 opened 1 year ago

Rei444 commented 1 year ago

Domain: https://www.ionos.de

Put the Domain in TestArray ...

 $testURLs = array(
    'https://aws.amazon.com',
    'https://www.ionos.de',
    'https://www.commerzbank.de',
    'https://www.apple.com',
  );

Start with:

php get-fav.php --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 " Console-Output:

PHP Warning: Undefined global variable $curl_timeout in /var/www/vhosts/---/httpdocs/get-fav.php on line 572 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined global variable $curl_timeout in /var/www/vhosts/---/httpdocs/get-fav.php on line 572 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined variable $filePath in /var/www/vhosts/---/httpdocs/get-fav.php on line 484 PHP Warning: Undefined global variable $curl_timeout in /var/www/vhosts/---/httpdocs/get-fav.php on line 572 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/d---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined global variable $curl_timeout in /var/www/vhosts/---/httpdocs/get-fav.php on line 572 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 PHP Warning: Undefined array key "SERVER_NAME" in /var/www/vhosts/---/httpdocs/get-fav.php on line 512 Icon: ./aws.amazon.com.ico Icon: ./commerzbank.de.ico Icon: ./apple.com.ico

Runtime: 2.71 Sec.

LeeThompson commented 1 year ago

What version of PHP? Looks like that's running on a web server too, Apache? (Just asking so I can try to repro it). Are you running it from a command line or via the web server? You have a space at the end of the user agent string, I'm not sure that will cause an issue but it might.

(This makes me think we should add a --support option to dump some support info.) (Just a note, my current build (202306161401) is able to get the icon without any problems. My user agent was set to Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0)