Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2005, 03:49 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default Random Picture

Hi
Is there any way that we can create random picture with php. I mean i know hoe create one, but the problem is i have to refresh the page to get another picture.
The thing that i want to do is when people come to for example image.php, without any refreshing images change. the best example is like .gif animation.

I got the code that used php and javascript together to do it, but is there any way that we can create it without javascript and only with php. (without Refreshing)

Thanks
Regards
Mani_he

 
Old January 24th, 2005, 04:40 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
quote:is there any way that we can create it without javascript and only with php. (without Refreshing)
No. PHP only runs on the server. JavaScript is ideal for what you need- why not use it?

You could also use Flash or put all of the images into an animaged GIF, but JavaScript would probably be a lot easier.

-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old January 24th, 2005, 05:01 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Snib
Why I do not want to use javascript is because if some person disable javascript the page with that is not working.

Tell me if i'm wrong?

Thanks
Regards
Mani_he

 
Old January 24th, 2005, 07:13 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You are correct, and if it means a lot to you to have a very accessible page, I suggest you go with an animated GIF. Personally I would use JavaScript.

hth,

-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old January 24th, 2005, 08:31 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks Snib

 
Old February 4th, 2005, 10:02 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perhaps Flash ?
 
Old February 5th, 2005, 04:24 AM
Authorized User
 
Join Date: Jul 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default

You can also try this,

<meta http-equiv="Refresh" content="30;url=http://www.yourdomain.com/">

this will refresh your whole page every 30 seconds.

You can use this inside a frame for only picture display so that your whole page does not refresh.

If u use frame only for the image display, by using meta refresh u can reload random picture not the whole page


Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenex.rubd.net
www.forum.rubd.net
 
Old February 5th, 2005, 12:56 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks guys
I think, make random pic with flash (Mantis) or gif animation (snib) is the best way.

Thanks
Regards
Mani_he







Similar Threads
Thread Thread Starter Forum Replies Last Post
Random recordset kumiko SQL Server 2005 3 March 8th, 2008 12:03 PM
Random Numbers welshboy2005 C# 1 May 19th, 2005 06:01 AM
OLE picture - accessing the picture property bdcrisp Excel VBA 0 December 7th, 2003 09:35 PM
Random Numbers not so random... katsarosj ASP.NET 1.0 and 1.1 Basics 5 November 20th, 2003 12:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.