Creating a well-done and unique favicon may already take some time, but getting it recognized and displayed correctly by every browser on every device - that's where the REAL work starts. We found that RealFaviconGenerator.net is doing a damned good job on that. So this component has been made to send them a master image to derive your icons from, then getting back a complete package with all necessary data and finally install it on your site. That's just 3 simple steps and you're done.
Changes
V 1.3
V 1.2
V 1.1
Sandro,
consult your provider or find a better (faster) hosting.
Your server takes too long, to finish the necessary tasks in the allowed time frame.
Friend, I can't install. Insists on the error "Error: Session timeout or network problem".
How should I proceed ?
This is an awesome component! Thank you so much!
I suspect something's missing in your php environment like allow_url_fopen
.
You may use the phpinfo section of the System Info component or manually run phpinfo(); to find out.
I'll have a look at doing that later on the demo site.
private function downloadFile($localPath, $url) {
$content = file_get_contents($url);
if ($content === FALSE) {
throw new InvalidArgumentException("Cannot download file at " . $url);
}
$ret = file_put_contents($localPath, $content);
if ($ret === FALSE) {
throw new InvalidArgumentException("Cannot store content of " . $url . " to " . $localPath);
}
}
That's the api's code. And to my understanding file_get_contents
already failed - not the storing part.
No idea why - for me it's working with 2 different sites. Try to add some error_logs inside ...
Said it couldn't download the file
Please provide the exact error message, Kevin.
Hi ~Z~
Just tried to use this on the WebChat demo site and it failed during the download procedure. Said it couldn't download the file - but the source it provided worked fine. I downloaded the Zip manually, stuck it in tmp/Favicons and realised your code is looking for faviconpackage.zip, but the one provided by the Favicons generator was called faviconpackage_v0.16.zip. I renamed it, re-ran the creation and this time it found and processed the zip file.
Maybe they've changed the filename they provide?
I have now installed the Favicons Generator, the ServiceWorker AND the SiteInstaller - and all seem to work great! Thank you for doing these. I'll add a cache to the ServiceWorker so the site can work offline - then try to figure out notifications :)
No idea.
I've just (11:15 am German local time) tried "Generate" and had no issues.
Some reasons I can think of:
1. the RealFaviconsGenerator service may be overloaded at times by too many simultaneous requests, so try again at different times
2. your server may be blacklisted for some reason
3. you're running additional software (like mod_security) which may block requests like that