Dinesh
Dinesh

Reputation: 175

How to get the website logo path from the link of the website

I have seen somewhere in the social website like bluefoxx.com, if you try to share the link of a website on the wall post like champrep.com or google.com, it displays the images for those websites may be the logos.

So can anyone please help me if i have to use same functionality in my php website how can i do that.

Thanks

Upvotes: 0

Views: 4132

Answers (2)

Jimmy T.
Jimmy T.

Reputation: 4190

It is either the file called /favicon.ico at the webserver or the file defined with <link rel="icon">:

<link rel="icon" href="http://example.com/favicon.ico" type="image/x-icon">

Upvotes: 2

Eduard Stoia
Eduard Stoia

Reputation: 25

In c# ASP.Net is simple ... you need to know the virtual path of that image ... bellow is a method that i used to save my barcode images that i ganerate into a web browser

public void GetPhoto(string filePath)
           {

               WebClient fileReader = new WebClient();
               fileReader.DownloadFile(filePath, Server.MapPath(string.Format("Image/someImage_{0}.jpg",txtBarCodeText.Text)));
               byte[] photo = null;


               string stream = Server.MapPath(string.Format("Image/someImage_{0}.jpg",txtBarCodeText.Text));
               TextBox1.Text = stream.ToString();

           }

filePath need to look like this... http://www.website.com/image.jpg you can right click on web picture you want to get and look to properties to see it's path Gook luck ;)

Upvotes: 0

Related Questions