[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [MISC] Kode til at kun Linux-brugere kan se en hjemmeside..





Jacob Sparre Andersen wrote:

Søren Haagerup skrev:


Nogen der lige hurtigt.. kunne brygge et eller andet
JavaScript sammen, som gør, at kun Linux-brugere kan se
den hjemmeside JavaScriptet er sat ind på?


Det lyder som et programmeringsspørgsmål. Har du prøvet at spørge på sslug-prog?


Hvis du nu kan leve med at det kører med Apache's Server Side Includes, er det ret nemt. Det giver også den fordel at du kan være ligeglad om brugeren har javascritp slået til eller ej.


Der findes en variabel: HTTP_USER_AGENT. Fx:
Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4) Gecko/20011206 Netscape6/6.2.1


Lav noget patternmatch på den i en .shtml side:. Noget i retning af:

<!--#if expr="$HTTP_USER_AGENT=/Mozilla\/4/ && $HTTP_USER_AGENT = /MSIE/" -->

Go away. Come back when you have a decent OS
<!--#else -->
Welcome, my dear friend

<!--#endif -->


Det kan sikkert laves mere smart, men det burde give dig ideen.


/kristian



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:28 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *