[SOLVED] URL image?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

URL image?

Post by Joe »

Is there any technique in PHP which allows you to enter a small image in the url bar when people visit your site. Just like when you goto PHP-dn and you look at the url bar and see the image on the left hand side. Is it possible to do this with PHP?

Thanks!
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

its not a function of anything, if im not mistaken its just a file placed in the root of your web space that is named favicon.ico
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

dull1554 is right. Create/get a 16x16 icon, name it favicon.ico, put it in your server root directory and add the following html code to the <head></head> section of every page of your site:

Code: Select all

<link rel="SHORTCUT ICON" href="favicon.ico">
Scorphus.
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

thanks for the tag team, i did not know that html was required i thought the web server did all the work
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Ahh ok thanks alot. It was something which I was confused about but now I know. I cannot thank you guys enough!

Cheers!
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

OK this is stupid but the image does not seem to appear in the url when I put the .ico file into the root directory and included the html between the head tags. Any further suggestions?
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

No problem, Joe.

dull1554, it is not really required, the web server does the work, but to conform with standards or to change the icon in other page you can use the <link> tag.

Scorphus.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

YAY its alive, lol. Thanks alot scorphus and dull1554. Much appreciated!
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

no prob, really did not do much.....====>>>>thank scorphus for further info, i just kinda nudged you in the right direction.........:)
Post Reply