WXforum.net

Web Weather => Weather Web Site Help => Topic started by: anchorageweather on August 15, 2006, 10:57:27 PM

Title: Realtime php display
Post by: anchorageweather on August 15, 2006, 10:57:27 PM
Hello all:

This might be slightly off topic - Mods, please let me know if it is, and I will delete it.

As I try to learn a little more about php for my weather site, I was wondering if anyone knew if there was such a thing as a webpage residing on a php enabled server that would display php code in real-time without uploading the file to the server.

I've pieced together something similar for html on my site at:

http://eetee.home.mindspring.com/HTMLpreviewing/HTML%20editor%20realtime%20previewing.htm

Feel free to take a look to see what I mean.  Is it possible to make a similar page for php?

If not, is there a good piece of php authoring software, that  I can use to learn with.  Thanks for any help.
Title: Realtime php display
Post by: Anole on August 16, 2006, 06:27:47 AM
No way to do what you want with PHP alone that I'm aware of. PHP executes on the server side at page load. Your example is using javascript which executes on the client side.

You might want to look into AJAX to try and accomplish what you want.

As far as authoring software goes I can't help you there. I just use a text editor.
Title: Realtime php display
Post by: SLOweather on August 16, 2006, 10:44:30 AM
There is a php tutorial at http://www.ibdhost.com/help/templates/ ,

Toward the top of the tutorial there are links to a couple of different php code generators.
Title: Realtime php display
Post by: grahamsbeachweather on August 16, 2006, 08:04:04 PM
:wink:
Title: Realtime php display
Post by: carterlake on August 17, 2006, 07:18:32 PM
Can't do PHP in real time... has to be AJAX with Javascript.

It's actually pretty easy to do.... surprisingly easy! Well... with Weather Display.

And see my main page: http://www.carterlake.org

Also try viewing it with Javascript disabled... very important to provide a graceful replacement for those very few people not using Javascript.

Oh, Ken's got page up on this now:

http://saratoga-weather.org/scripts-WD-AJAX.php