You are here: Re: Random index « HTML « IT news, forums, messages
Re: Random index

Posted by someusernamehere on 07/20/07 20:42

On Jul 20, 2:19 pm, "nice.guy.nige" <nigel_m...@deadspam.com> wrote:
> While the city slept, someusernamehere (someusernameh...@gmail.com)
> feverishly typed...
>
> > Hey I have a web page translated into 3 languages, it's possible that
> > when the page is visited load a random index?
> > I have index.es.html index.pt.html index.en.html
>
> > it's possible load ramdom this?
>
> Yes it is, although wouldn't this be rather infuriating for your visitors?
>
> In any case, if you can run php on your server, the following will work.
> Save it as index.php;
>
> <?php
>
> $index = array( "index.es.html",
> "index.pt.html",
> "index.en.html");
>
> include $index[rand(0, 2)];
>
> ?>
>
> You can see it in action here:http://www.nigenet.org.uk/stuff/test/randomIndex/index.php



hehehehe sure, this works fine for my !!! many thanks


muito obrigado

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация