Getting favicon from URL

images php coding issues or problems here.

Moderators: macek, egami, gesf

soder
New php-forum User
New php-forum User
Posts: 15
Joined: Fri Mar 16, 2012 7:38 pm

Getting favicon from URL

Postby soder » Sun Mar 18, 2012 11:33 am

Heya, Im not 100% sure if this is the right forum or not. If it's wrong forum please move it mod.

Im trying to get the websites favicon printed on my website and this is what im currently using:

Code: Select all


$favicon 
= "http://www.google.com/s2/favicons?domain=$row[link]";
<
img src="$favicon\"></img>


The problem is it will only print the favicon for example "http://tibia.com", but not "http://www.tibia.com/news/?subtopic=latestnews".

Anyone got a code/tips for that?

Kind regards,
Soder.

soder
New php-forum User
New php-forum User
Posts: 15
Joined: Fri Mar 16, 2012 7:38 pm

Re: Getting favicon from URL

Postby soder » Mon Mar 19, 2012 9:15 am

boybawang wrote:Favicon stands for "Favorites Icon". It's the little icon beside your site's name in the favorites list, before the URL in the address bar and bookmarks folder and as a bookmarked website on the desktop in some operating systems. Nice share :)



DBA Solutions


I know that. You probably didnt read my whole post or I explained it poorly.

It get's the favicon if the URL is
"http://tibia.com"
but not "http://www.tibia.com/news/?subtopic=latestnews".

Any solutions anyone?

Regards,
Soder.

fishchunks
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Mar 22, 2012 8:19 am

Re: Getting favicon from URL

Postby fishchunks » Thu Mar 22, 2012 8:37 am

I suggest you change the header of page page and include this...

<link rel="icon" type="image/png" href="http://www.tibia.com/news/?subtopic=latestnews" />

...Thats all i can think of, sorry if it doesn't help.



-Teh Fishy


Return to “PHP coding => Images”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest