NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Different favicons for a parked domains?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-13-2005, 12:46 AM THREAD STARTER               #1 (permalink)
RJ
NamePros Webmaster


 
RJ's Avatar
Join Date: Feb 2003
Posts: 12,930
RJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatness
 



Find Marrow Donors! Cystic Fibrosis Parkinson's Disease

Different favicons for a parked domains?


Quandary: How can I serve a different favicon for a parked domain?

I have several parked domains using the same hosting account. PHP is used to detect the domain and serve different content for that domain. I'd like to also serve a different favicon.ico for each of the parked domains.

What's the solution?

__________________
@DomainBuyer facebook
RJ is offline  
Old 09-13-2005, 01:02 AM   #2 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




I'm sure there's a lot of solution, but the first way I'd try is the following.

In the .htaccess use ForceType to force Apache to use PHP handler when delivering the file "favicon.ico". Write a simple php script returning the .ico mime type then an .ico content file and use your database to pick up the right favicon.ico

That could be worked
dgaussin is offline  
Old 09-13-2005, 01:21 AM THREAD STARTER               #3 (permalink)
RJ
NamePros Webmaster


 
RJ's Avatar
Join Date: Feb 2003
Posts: 12,930
RJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatness
 



Find Marrow Donors! Cystic Fibrosis Parkinson's Disease
I like that solution a lot. Serving favicon.ico as a forced PHP script and using it to pick the right .ICO file would probably work great.

To serve a PNG file I would do this,

$im = imagecreatefrompng("test.png");
imagepng($im);

How would you do the same thing with .ICO files?
__________________
@DomainBuyer facebook
RJ is offline  
Old 09-13-2005, 01:37 AM   #4 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




You don't have to create an .ico file, just open and read an .ico file and send the content to browser.

Even somethig like could work :

$icon = file_get_contents('domain1.ico');
header ("Content-type: image/jpeg");
echo $icon;
dgaussin is offline  
Old 09-13-2005, 01:52 AM THREAD STARTER               #5 (permalink)
RJ
NamePros Webmaster


 
RJ's Avatar
Join Date: Feb 2003
Posts: 12,930
RJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatness
 



Find Marrow Donors! Cystic Fibrosis Parkinson's Disease
Originally Posted by dgaussin
You don't have to create an .ico file, just open and read an .ico file and send the content to browser.
????: NamePros.com http://www.namepros.com/programming/123315-different-favicons-for-a-parked-domains.html

Even somethig like could work :

$icon = file_get_contents('domain1.ico');
header ("Content-type: image/jpeg");
echo $icon;
Thanks, David. I was trying to make it more complicated than I needed to. Time to put this altogether now and code it.

For future reference, I found that the MIME type for favicon files is "image/vnd.microsoft.icon"
__________________
@DomainBuyer facebook
RJ is offline  
Old 09-13-2005, 01:57 AM   #6 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




Seems favicon has a lot of mime type
The best is to use the mime type used by the server...
dgaussin is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
NUMB3RS: What’s the deal with 4-Digit Domains (NNNN)? paxton "Short" Domain Discussion 176 01-26-2012 04:42 PM
FREE HOT Expiring domains list Tools Vonna.com Domain Newbies 34 03-21-2006 03:21 PM
Parked domains penalized? kektex Search Engines 3 07-07-2005 12:52 PM
WHOLESALE List of Sports & Fitness Domains Duke Domains For Sale - Make Offer 4 09-03-2003 12:58 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 10:35 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger