Reply to Re: How do I put random quotes on my web site?

Your name:

Reply:


Posted by Jim Higson on 03/11/06 19:06

Chris Ianson wrote:

> "Toby Inkster" <usenet200603@tobyinkster.co.uk> wrote in message
> news:00mae3-ipc.ln1@ophelia.g5n.co.uk...
>> Chris Ianson wrote:
>>
>>> Hi, I'm looking for a simple newbie way to put quotes into HTML code,
>>> and
>>> have them randomise each time the page is refreshed. What's the easy
>>> solution?
>>
>> If your server supports PHP...
>>
>> <?php
>> $cmd = '/usr/games/fortune';
>> printf("<blockquote><p>%s</p></blockquote>",
>> nl2br(htmlspecialchars(system($cmd))));
>> ?>
>
> Thanks. What if it doesn't support PHP (it doesn't)?

Does it support any scripting language?

There's a unix program called 'fortune' that's installed on pretty much all
servers and is just for getting quotes. A neat solution would be to put the
output from that into your pages.

--
Jim

[Back to original 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

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