C
C#11mo ago
ByGoalZ

❔ Get website icons from URL

Hey, so I'm currently learning C# (i have coded in other languages already) and for my first project I wanted to make a password manager. I already kind of planned how it should work but I thought of a cool idea. In a password manager you give the website (i.e. twitter.com) and your password (then it will be saved to a text file). What I want to do is to automatically get the icon of that website (if possible) and add it on an imagelabel (im using windows forms in visual studio). Would that even work, and if yes, how? It may be too advanced as a beginner but I like learning like that.
11 Replies
Pobiega
Pobiega11mo ago
there is a convention for those icons, they are called favicon the most common thing is to just serve it at your root level under favicon.ico, but you can read the HTML to find the one used if its not there <link rel="icon" type="image/x-icon" href="/images/favicon.ico"> as an example: https://twitter.com/favicon.ico
ByGoalZ
ByGoalZ11mo ago
Thank you! Is there a good documentation on how to implement those icons?
Pobiega
Pobiega11mo ago
what do you mean by that? You have not mentioned anything about your program, so I don't know if its a blazor, MAUI, WPF, Avalonia, Winforms, console app etc.. and "implement" how?
Florian Voß
Florian Voß11mo ago
the word implement leads us to believe you wanna create the icon yourself. You probably mean how to add an existing icon as favicon on your website?? answer what you're using from here @ByGoalZ
Angius
Angius11mo ago
https://www.google.com/s2/favicons?domain=[the-domain] lets you get favicons from Google cache
Angius
Angius11mo ago
And so on
ByGoalZ
ByGoalZ11mo ago
I did mention windowsforms I meant like implementing the url in the code
Pobiega
Pobiega11mo ago
that still doesnt actually mean anything
Accord
Accord11mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ Serilog Extend LogLevels or Intercept LogsI am using Serilog and I have a specific use case right. I got three sinks (Console, File, SQLServer❔ [Resolved] How to delete the OBJ folder after a buildHello it's been several days that when I try to build it gives me this error: ```csharp Fody: An ❔ Can you create .net core Web API with c# dev kit in vscode that DOESN'T use the minimal syntax?Seems like the option is not there like in VS.❔ AWS ALB with Lambda target group with dotnet 6 not getting multi value querystring parameters?Does anyone know all the places that need to be checked, to ensure multi value querystring parameter❔ Binding a DTO from route and bodyI have been trying to do this for the last 5 years. I want to be able to send something like a put r❔ How can I make a function of a simple condition EF Core translatableHey, so I have this function, but it seems to throw an error by not being translatable by EF Core, e❔ ASP.NET Core ignoring custom DynamicRouteValueTransformerI have created a custom DynamicRouteValueTransformer to help me switch between 2 controllers and act❔ LINQDoes linq have its own replace method? If so, does it make a new string or modify? Also is there a w❔ AspNetCore.Components.NavigationExceptionHey everyone, I'm currently working on a Blazor project and using Identity for IAM. However, I've d✅ How to style menu bar??? avaloniaI have figured out how to style the menu bar itself, and style the items in the menu bar, however, I